Files
sqltoolsservice/docs/guide/building_sqltoolsservice.md
Alex Ma 5e3d24bbfa Remove code coverage from STS (#1537)
* WIP removal of code coverage

* more coverage removed

* more fixes

* fix tests
2022-06-10 13:53:43 -07:00

43 lines
2.0 KiB
Markdown

## Build the SQL Tools Service
> SQL Tools Service depends on .Net Core SDK. Please install .Net Core SDK before building.
> Please see [https://dotnet.github.io](https://dotnet.github.io/) for additional information on .Net Core.
1. Clone the SQL Tools Service repo from [https://github.com/Microsoft/sqltoolsservice](https://github.com/Microsoft/sqltoolsservice).
2. Run `dotnet restore` from the cloned repo's root directory.
3. Run `dotnet build src/Microsoft.SqlTools.ServiceLayer` from the cloned repo's root directory.
> *Tip* there is a `build.cmd` or `build.sh` file in the repo's root directory that can be used
> to build and package the service.
## Building the Documentation
> The documentation is generated using docfx. Please install docfx from
> [https://dotnet.github.io/docfx/](https://dotnet.github.io/docfx/).
1. Clone the SQL Tools Service docs repo from [https://github.com/Microsoft/sqltoolssdk](https://github.com/Microsoft/sqltoolssdk).
2. Run `docfx docfx.json --serve` from the docs directory.
3. Copy the contents of the docs/_site directory to the root directory of the sqltoolssdk repo.
## Run Tests
The SQL Tools Service has several different types of tests such as unit tests, "connected" tests,
integration tests, perf tests and stress tests.
### Running Unit Tests
1. Run `dotnet restore` from the cloned repo's root directory.
2. Run `dotnet test test/Microsoft.SqlToosl.ServiceLayer.Test` from the cloned repo's root directory.
The test output should be similar to the below. There may also be additional debugging output based on
test details and execution environment.
```
xUnit.net .NET CLI test runner (64-bit win10-x64)
Discovering: Microsoft.SqlTools.ServiceLayer.Test
Discovered: Microsoft.SqlTools.ServiceLayer.Test
Starting: Microsoft.SqlTools.ServiceLayer.Test
=== TEST EXECUTION SUMMARY ===
Microsoft.SqlTools.ServiceLayer.Test Total: 434, Errors: 0, Failed: 0, Skipped: 0, Time: 21.139s
SUMMARY: Total: 1 targets, Passed: 1, Failed: 0.
```