-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun-unit-test-case.sh
More file actions
23 lines (17 loc) · 884 Bytes
/
run-unit-test-case.sh
File metadata and controls
23 lines (17 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# run-unit-test-case.sh
# Contentstack
#
# Created by Uttam Ukkoji on 30/03/2023.
# Copyright © 2026 Contentstack. All rights reserved.
echo "Removing files"
rm -rf "./Contentstack.Management.Core.Unit.Tests/TestResults"
FILE_NAME="Contentstack-DotNet-Test-Case"
echo "Running test case..."
dotnet test "Contentstack.Management.Core.Unit.Tests/Contentstack.Management.Core.Unit.Tests.csproj" --logger "trx;LogFileName=Report-$FILE_NAME.trx" --collect:"XPlat code coverage"
echo "Generating enhanced HTML report..."
dotnet run --project tools/EnhancedTestReport/EnhancedTestReport.csproj -- \
--trx-dir "Contentstack.Management.Core.Unit.Tests/TestResults" \
--cobertura-dir "Contentstack.Management.Core.Unit.Tests/TestResults" \
--output "Contentstack.Management.Core.Unit.Tests/TestResults/EnhancedReport-$FILE_NAME.html"
echo "Test case Completed..."