Files
UA-.NETStandard/Tests/codecoverage.sh
T
Martin Regen 0236d082b1 Create client and server test projects, increase test coverage (#1434)
- Add Operation limit parameter and fix server. Fixes #1363 
- Add client/server test projects
- Add client and server fixture for test runs
- Server tests can test services without client connection
- Client tests can use common services to write tests which can run directly on server on via client server connection
- Increase code coverage > 50%
- Code coverage excludes the generated code
- Improve codecoverage local tests with report (see Tests/codecoverage scripts)
- Add a benchmark framework to client server tests
2021-07-06 18:01:54 +02:00

18 lines
809 B
Bash
Executable File

#!/bin/bash
# Copyright (c) OPC Foundation. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
BUILDROOT=$(pwd)/..
cd $BUILDROOT
rm -r ./CodeCoverage
rm -r ./TestResults
dotnet test "UA Core Library.sln" -v n --configuration Release --framework netcoreapp3.1 --collect:"XPlat Code Coverage" --settings ./Tests/coverlet.runsettings.xml --results-directory ./TestResults
# ensure latest report tool is installed
dotnet tool uninstall -g dotnet-reportgenerator-globaltool
dotnet tool install -g dotnet-reportgenerator-globaltool
reportgenerator -reports:./TestResults/**/coverage.cobertura.xml -targetdir:./CodeCoverage -reporttypes:"Badges;Html;HtmlSummary;Cobertura"
# Display result in browser (mac OS)
open ./CodeCoverage/index.html