mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
43 lines
2.0 KiB
Markdown
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.
|
|
``` |