diff --git a/GoogleTestExtension/Resources/AllTestSettings.gta.runsettings b/GoogleTestExtension/Resources/AllTestSettings.gta.runsettings new file mode 100644 index 000000000..76695ad46 --- /dev/null +++ b/GoogleTestExtension/Resources/AllTestSettings.gta.runsettings @@ -0,0 +1,20 @@ + + + + -testdirectory=$(TestDir) + Tests\Returns0.bat + Tests\Returns1.bat + false + 4 + 1 + false + true + 10 + false + false + 0 + .*Tests.*.exe + + + + \ No newline at end of file diff --git a/README.md b/README.md index f7e8c1470..a12f8dc09 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Google Test Adapter (GTA) is a Visual Studio extension providing test discovery Google Test Adapter can be installed in two ways: * Install through the Visual Studio Gallery at *Tools/Extensions and Updates* - search for *Google Test Adapter*. This will make sure that the extension is updated automatically -* Download and launch the [VSIX installer](https://github.com/csoltenborn/GoogleTestAdapter/releases/download/v0.2/GoogleTestAdapter-0.2.0.vsix) (which can also be downloaded from the [Visual Studio Gallery](https://visualstudiogallery.msdn.microsoft.com/94c02701-8043-4851-8458-34f137d10874)) +* Download and launch the [VSIX installer](https://github.com/csoltenborn/GoogleTestAdapter/releases/download/v0.2.1/GoogleTestAdapter-0.2.1.vsix) (which can also be downloaded from the [Visual Studio Gallery](https://visualstudiogallery.msdn.microsoft.com/94c02701-8043-4851-8458-34f137d10874)) After restarting VS, your tests will be displayed in the test explorer at build completion time. If no or not all tests show up, switch on *Debug mode* at *Tools/Options/Google Test Adapter/General*, which will show on the test console whether your test executables are recognized by GTA. If they are not, configure a *Test discovery regex* at the same place. @@ -38,10 +38,10 @@ After restarting VS, your tests will be displayed in the test explorer at build GTA is configured following Visual Studio's approach of configuration inheritance. There are three configuration levels: 1. Global options are configured in *Tools/Options/Google Test Adapter*. -2. Solution specific options override global options. They are provided by means of an XML configuration file; this allows sharing of settings via source control. The configuration file must be placed in the same folder as the solution's `.sln` file, and must have the same name as that file, but with extension `.gta.runsettings`. E.g., if the solution file's name is `Foo.sln`, the settings file must be named `Foo.gta.runsettings`. As a start, you can download a [sample solution test settings file](https://raw.githubusercontent.com/csoltenborn/GoogleTestAdapter/master/SampleGoogleTestTests/SampleGoogleTestTests.gta.runsettings). -3. Finally, VS allows for the selection of [test settings](https://msdn.microsoft.com/en-us/library/jj635153.aspx) files via the *Test/Test Settings* menu. GTA test settings can be added to an existing `.runsettings` file by adding a `GoogleTestAdapter` node to the `RunSettings` node of the file; such settings override global and solution settings. +2. Solution specific options override global options. They are provided by means of an XML configuration file; this allows sharing of settings via source control. The configuration file must be placed in the same folder as the solution's `.sln` file, and must have the same name as that file, but with extension `.gta.runsettings`. E.g., if the solution file's name is `Foo.sln`, the settings file must be named `Foo.gta.runsettings`. As a start, you can download a [sample solution test settings file](https://raw.githubusercontent.com/csoltenborn/GoogleTestAdapter/master/Resources/AllTestSettings.gta.runsettings). A realistic example is provided as part of the SampleGoogleTestTests solution. +3. Finally, VS allows for the selection of [test settings](https://msdn.microsoft.com/en-us/library/jj635153.aspx) files via the *Test/Test Settings* menu. GTA test settings can be added to an existing `.runsettings` file by adding a `GoogleTestAdapter` node to the `RunSettings` node of the file; such settings override global and solution settings. A sample file `NonDeterministic.runsettings` is provided as part of the SampleGoogleTestTests solution. -Note that due to the overriding hierarchy described above, you probably want to provide only a subset of the nodes under `GoogleTestAdapter` in your configuration files. For instance, providing the node `true` in a shared solution settings file will make sure that all sharing developers will run GTA with debug output, no matter what the developer's individual settings at *Tools/Options/Google Test Adapter* are (and unless the developer has selected a test settings file via VS which again overrides that setting). +Note that due to the overriding hierarchy described above, you probably want to provide only a subset of the nodes under `GoogleTestAdapter` in your configuration files. For instance, providing the node `true` in a shared solution settings file will make sure that all sharing developers will run GTA with debug output, no matter what the developer's individual settings at *Tools/Options/Google Test Adapter* are (and unless the developer has selected a test settings file via VS, which would override the solution setting). #### Assigning traits to tests diff --git a/SampleGoogleTestTests/NonDeterministic.runsettings b/SampleGoogleTestTests/NonDeterministic.runsettings index 410ca1587..692ab9014 100644 --- a/SampleGoogleTestTests/NonDeterministic.runsettings +++ b/SampleGoogleTestTests/NonDeterministic.runsettings @@ -1,6 +1,8 @@ + true 5 + Tests\Returns0.bat \ No newline at end of file diff --git a/SampleGoogleTestTests/SampleGoogleTestTests.gta.runsettings b/SampleGoogleTestTests/SampleGoogleTestTests.gta.runsettings index 76695ad46..b3301d599 100644 --- a/SampleGoogleTestTests/SampleGoogleTestTests.gta.runsettings +++ b/SampleGoogleTestTests/SampleGoogleTestTests.gta.runsettings @@ -1,20 +1,9 @@ - + -testdirectory=$(TestDir) Tests\Returns0.bat Tests\Returns1.bat - false - 4 - 1 - false - true - 10 - false - false - 0 .*Tests.*.exe - - \ No newline at end of file