Commit Graph

8 Commits

Author SHA1 Message Date
Leila Lali
b353b2137e New test common project for database connections using the settings.json (#210)
* moved test driver tests and test common classes to separate projects
2017-01-11 13:47:56 -08:00
Connor Quagliana
3ad7cc1a8b Move Integration Tests to dedicated project (#201)
Add IntegrationTests project. Move all tests ifdef'd with LIVE_CONNECTION_TESTS to IntegrationTests project. Delete files that have no remaining code. Update codecoverage.bat to run integration tests
2017-01-04 11:37:57 -08:00
Benjamin Russell
db1e4ae351 Fix Code Coverage (#151)
This is another large code review. I want to make a few more changes, but since these changes will stand on their own, I'll hold back on making this change set any larger than it already is.
Changes in this request:
To address Microsoft/vscode-mssql#326, instead of doing taskkill on the service layer when WaitForExit is executed, we now make an educated guess at which service layer was spawned when the test starts and do a Process.Kill on it when we shut down the test.
All the perf tests have been moved into a new project. This was done to keep them easily separated from code coverage test runs. At the same time the perf tests were separated into separate classes for logical categorization. This process will likely be repeated on the stress tests. The tests can still easily be ran from Visual Studio Test Explorer
To address Microsoft/vscode-mssql#349, a new SelfCleaningFile class was created to allow for easy cleanup of temporary files generated for integration tests via using blocks.
Due to some of the refactoring done while moving the perf tests to a new project, the TestBase class had to be switched to more of a helper class style. As such, all tests that use inherit from TestBase now create a TestBase object on start via a using block. This also simplifies the cleanup at the end of the test.

* Solution for hanging code coverage runs

Code coverage runs would hang in certain scenarios if a test failed before
the service process could be spawned. The taskkill command would fail to
find the service process. The test would then wait for opencover to exit,
but it would not since the service process it had spawned would still be
running, causing the test run to hang indefinitely.

Solution was to capture the service process after it launched and
explicitly kill it when shutting down the test driver.

* Setting the test name in the propery in the class and removign the parameter from each method

* New project for perf tests

* Reworking integration tests to cleanup temp files

* Changes as per @llali review comments

* Adding copyright notices
* Renaming TestBase => TestHelper
* Renaming SelfCleaningFile => SelfCleaningTempFile
* Removing code that sets TestName property

* Fixing compilation error due to removed code
2016-11-18 17:46:56 -08:00
Benjamin Russell
3808dcdafd Adding TestDriver project and CodeCoverage folder to the main solution (#133)
This will make it much easier for Visual Studio users to validate the TestDriver project.

* Adding TestDriver project and CodeCoverage folder to the main solution

* Adding fallback value for service layer exe path to allow tests to run in Visual Studio
2016-11-07 15:08:53 -08:00
Benjamin Russell
938ebb69e0 Adding SRGen to build scripts (#45)
* Adding SRGen to build scripts

Adding support for sr.strings files. sr.strings files can be converted
into .resx and designer cs files by running the SRGen Cake target
Adding a new target to Cake script to run SRGen. SRGen is pulled down as a
nuget package for Cake and executes from the .tools folder.
Adding Cake temp environment to the gitignore
Adding the cake scripts to the sqltoolsservice solution file

* Fixes from pull request comments

* Fix as per @llali

* Actual changes as per @llali

* removing platform type from netcore dependency
2016-09-14 10:29:34 -07:00
Benjamin Russell
f1eebd989a Adding other global files as solution items 2016-08-03 14:27:09 -07:00
Benjamin Russell
e83d2704b9 Fixing project names to fix VS bugs
For whatever reason, Visual Studio throws a fit if a referenced project has a name
and the folder name (which is used to reference the project) is different than that name.
To solve this issue, I've renamed all the projects and folders to match their project
names as stated in the project.json.
2016-07-29 16:55:44 -07:00
benrr101
2a6a33fc11 Adding VS2015 support for ServiceHost project
Creating the standard sln flies for the root of the sqltoolsservice
project and adding xproj files for the individual projects.

Has been confirmed to open and build with VS2015. xUnit tests will work,
but only from Test Explorer (ie, ReSharper test runner doesn't work with
dnx)

Note: This may be subject to change as new standards for .NET Core project
files are developed. See dotnet/roslyn-project-system#37 for more details.
2016-07-19 14:56:44 -07:00