You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
capturedContent.Should().Be("This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.");
Copy file name to clipboardExpand all lines: test/Cli/Func.E2E.Tests/README.md
+27-2
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ There are two main types of tests for the `func start` command:
36
36
❗ **Dotnet isolated templates and dotnet in-proc templates CANNOT be run in parallel**
37
37
38
38
- Use traits to distinguish between dotnet-isolated and dotnet-inproc tests
39
+
- Refer to TestTraits.cs for trait names and explanations on when they should be used
39
40
- This ensures they run sequentially rather than in parallel
40
41
41
42
### Node.js Tests
@@ -154,9 +155,17 @@ else
154
155
}
155
156
```
156
157
158
+
You may also create a custom condition and then call the method like so:
159
+
160
+
```csharp
161
+
// Validate inproc6 host was started
162
+
result.Should().StartInProc6Host();
163
+
164
+
```
165
+
157
166
## Testing with Fixtures
158
167
159
-
The steps are similar for creating a `func start` test with a fixture, except you can skip the setup logic that calls `func init` and `func new` as the fixture handles this for you.
168
+
The steps are similar for creating a `func start` test with a fixture, except you can skip the setup logic that calls `func init` and `func new` as the fixture handles this for you. Please ensure that the test that are being added to the fixture DO NOT change the environment or add any extra variables or config, as that may cause problems with the existing tests.
160
169
161
170
## Complete Example
162
171
@@ -202,4 +211,20 @@ public async Task Start_DotnetIsolated_Test_EnableAuthFeature(
1. Run `dotnet build` on `Azure.Functions.Cli.E2E.Tests.csproj`.
221
+
222
+
2. Navigate to `CORE_TOOLS_REPO_ROOT\out\bin\Azure.Functions.Cli.E2E.Tests\debug` and add a `templates` file if it doesn't already exist. Copy the existing templates file from the core tools installation on your local machine to the debug directory.
223
+
224
+
3. To test in-proc artifacts, copy the `inproc6` and `inproc8` directories by either:
225
+
- Building the `inproc` branch locally and manually copying the folders into the debug folder, or
226
+
- Copying these folders from the core tools installation on your local machine to the debug folder.
227
+
228
+
4. Execute the tests using the `dotnet test` command or Visual Studio Test Explorer. Note that only tests requiring default artifacts (not in-proc artifacts) will run by default.
229
+
230
+
5. To run a specific test with runtime settings, use: `dotnet test {PATH_TO_E2E_TEST_PROJECT} --filter "TestCategory=InProc"`.`
0 commit comments