Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/docs/execution/engine-modes.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ set TUNIT_EXECUTION_MODE=reflection
export TUNIT_EXECUTION_MODE=reflection
```

Alternatively, you can configure this in a `.runsettings` file:
```xml
<RunSettings>
<RunConfiguration>
<EnvironmentVariables>
<TUNIT_EXECUTION_MODE>reflection</TUNIT_EXECUTION_MODE>
</EnvironmentVariables>
</RunConfiguration>
</RunSettings>
Alternatively, you can configure this in a `testconfig.json` file:
```json
{
"testingPlatform": {
"environmentVariables": {
"TUNIT_EXECUTION_MODE": "reflection"
}
}
}
```

### Optimizing Build Performance in Reflection Mode
Expand Down
47 changes: 20 additions & 27 deletions docs/docs/extensions/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,29 @@ See the migration guides for detailed instructions:

#### Advanced Configuration

You can customize coverage with a `.runsettings` file:

**coverage.runsettings:**
```xml
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*tests\.dll$</ModulePath>
</Exclude>
</ModulePaths>
</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
You can customize coverage with a `testconfig.json` file:

**testconfig.json:**
```json
{
"codeCoverage": {
"Configuration": {
"CodeCoverage": {
"ModulePaths": {
"Include": [".*\\.dll$"],
"Exclude": [".*tests\\.dll$"]
}
}
}
}
}
```

**Use it:**
Place the `testconfig.json` file in the same directory as your test project. It will be picked up automatically when running tests.

**Alternatively, you can use an XML coverage settings file:**
```bash
dotnet run --configuration Release --coverage --coverage-settings coverage.runsettings
dotnet run --configuration Release --coverage --coverage-settings coverage.config
```

**📚 More Resources:**
Expand Down
49 changes: 21 additions & 28 deletions docs/docs/migration/mstest.md
Original file line number Diff line number Diff line change
Expand Up @@ -1242,36 +1242,29 @@ You can view these with:

### Advanced Coverage Configuration

You can customize coverage behavior with a `.runsettings` file (same format as MSTest):
You can customize coverage behavior with a `testconfig.json` file:

**coverage.runsettings:**
```xml
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*tests\.dll$</ModulePath>
</Exclude>
</ModulePaths>
</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
**testconfig.json:**
```json
{
"codeCoverage": {
"Configuration": {
"CodeCoverage": {
"ModulePaths": {
"Include": [".*\\.dll$"],
"Exclude": [".*tests\\.dll$"]
}
}
}
}
}
```

**Use it:**
Place the `testconfig.json` file in the same directory as your test project. It will be picked up automatically when running tests.

**Alternatively, you can use an XML coverage settings file:**
```bash
dotnet run --configuration Release --coverage --coverage-settings coverage.runsettings
dotnet run --configuration Release --coverage --coverage-settings coverage.config
```

### Troubleshooting
Expand All @@ -1281,8 +1274,8 @@ dotnet run --configuration Release --coverage --coverage-settings coverage.runse
- Verify you have a recent .NET SDK installed

**Missing coverage for some assemblies?**
- Use a `.runsettings` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage)
- Use a `testconfig.json` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://github.com/microsoft/codecoverage/blob/main/docs/configuration.md)

**Need help?**
- See [TUnit Code Coverage Documentation](../extensions/extensions.md#code-coverage)
Expand Down
53 changes: 23 additions & 30 deletions docs/docs/migration/nunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -958,36 +958,29 @@ You can view these with:

### Advanced Coverage Configuration

You can customize coverage behavior with a `.runsettings` file:
You can customize coverage behavior with a `testconfig.json` file:

**coverage.runsettings:**
```xml
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*tests\.dll$</ModulePath>
</Exclude>
</ModulePaths>
</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
```

**Use it:**
**testconfig.json:**
```json
{
"codeCoverage": {
"Configuration": {
"CodeCoverage": {
"ModulePaths": {
"Include": [".*\\.dll$"],
"Exclude": [".*tests\\.dll$"]
}
}
}
}
}
```

Place the `testconfig.json` file in the same directory as your test project. It will be picked up automatically when running tests.

**Alternatively, you can use an XML coverage settings file:**
```bash
dotnet run --configuration Release --coverage --coverage-settings coverage.runsettings
dotnet run --configuration Release --coverage --coverage-settings coverage.config
```

### Troubleshooting
Expand All @@ -997,8 +990,8 @@ dotnet run --configuration Release --coverage --coverage-settings coverage.runse
- Verify you have a recent .NET SDK installed

**Missing coverage for some assemblies?**
- Use a `.runsettings` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage)
- Use a `testconfig.json` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://github.com/microsoft/codecoverage/blob/main/docs/configuration.md)

**Need help?**
- See [TUnit Code Coverage Documentation](../extensions/extensions.md#code-coverage)
Expand Down
49 changes: 21 additions & 28 deletions docs/docs/migration/xunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -1288,36 +1288,29 @@ You can view these with:

### Advanced Coverage Configuration

You can customize coverage behavior with a `.runsettings` file:
You can customize coverage behavior with a `testconfig.json` file:

**coverage.runsettings:**
```xml
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="Code Coverage">
<Configuration>
<CodeCoverage>
<ModulePaths>
<Include>
<ModulePath>.*\.dll$</ModulePath>
</Include>
<Exclude>
<ModulePath>.*tests\.dll$</ModulePath>
</Exclude>
</ModulePaths>
</CodeCoverage>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
**testconfig.json:**
```json
{
"codeCoverage": {
"Configuration": {
"CodeCoverage": {
"ModulePaths": {
"Include": [".*\\.dll$"],
"Exclude": [".*tests\\.dll$"]
}
}
}
}
}
```

**Use it:**
Place the `testconfig.json` file in the same directory as your test project. It will be picked up automatically when running tests.

**Alternatively, you can use an XML coverage settings file:**
```bash
dotnet run --configuration Release --coverage --coverage-settings coverage.runsettings
dotnet run --configuration Release --coverage --coverage-settings coverage.config
```

### Troubleshooting
Expand All @@ -1327,8 +1320,8 @@ dotnet run --configuration Release --coverage --coverage-settings coverage.runse
- Verify you have a recent .NET SDK installed

**Missing coverage for some assemblies?**
- Use a `.runsettings` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-code-coverage)
- Use a `testconfig.json` file to explicitly include/exclude modules
- See [Microsoft's documentation](https://github.com/microsoft/codecoverage/blob/main/docs/configuration.md)

**Need help?**
- See [TUnit Code Coverage Documentation](../extensions/extensions.md#code-coverage)
Expand Down
Loading
Loading