- Download and install .NET SDK
- Have a game instrumented with AltTester Unity SDK
- Have AltTester Desktop app installed (to be able to inspect game)
This repository is a test project that uses NUnit as the test library. It was generated using following command (as suggested in documentation)
dotnet new nunit
AltTester Unity SDK framework contains AltDriver
class used to connect to the instrumented game developed w/ Unity. AltTester-Driver for C# is available as a nuget package. Install AltTester-Driver nuget package
dotnet add package AltTester-Driver --version 1.8.0
Run tests manually (with dotnet CLI)
- Launch game
- From
CoinCollector.Tests
execute all tests:
dotnet test
! Make sure to have the Alttester Desktop App closed, otherwise the test won't be able to connect to proper port.
dotnet test --filter <test_class_name>
dotnet test --filter <test_class_name>.<test_name>
Using Allure
Read Setup Allure as pre-requisite.
allure_run_tests_generate_report.sh
-
Launch game from
AppCoinCollector\CoinCollectorStandalone.exe
-
Move to
CoinCollector.Tests
-
Execute all tests and generate output specific for Allure NUnit adapter
dotnet test --results-directory allure-results
- Generate test results report
allure serve allure-results
After generating allure-report, when we need to save everything into one html file (to share it): install an external package which builds allure generated folder into one html file.
Requirements: Python 3.6+
pip install allure-combine
allure-combine package implementation and documentation
Then each time after running test, when want to save allure-report in one sharable HTML file:
allure generate -o allure-report
allure-combine ./allure-report