Uploading GameDriver Test Results to QaaS
The QaaS Reporter is a small library that turns the test runs you already have into the data behind the GameDriver Reporting and Analytics dashboards. It records each test’s outcome, duration and category as the run happens, then uploads a single summary once the run finishes.
You do not change how your tests are written or executed. The Reporter adds two lines to your test project and reads its configuration from environment variables, so nothing in your test code has to know about it.
Before you start
Section titled “Before you start”You need three things:
- An NUnit test project. GameDriver tests are NUnit tests, so if you are already running them, you are ready.
- Reporting and Analytics access, and a QaaS API key issued to you (see below).
- Somewhere to set environment variables, usually your CI pipeline’s secrets or variables.
The Reporter targets .NET Standard 2.0, so it works with .NET Framework 4.6.1 and later, .NET Core 2.0 and later, .NET 5 and later, Mono 5.4 and later, and Unity projects set to the .NET Standard API compatibility level.
1. Get an API key
Section titled “1. Get an API key”The Reporter authenticates with a per-company API key.
- A company administrator signs in to the QaaS portal and opens Administration > API keys.
- They issue a key and assign it to a named person.
- That person opens My API keys and reveals the secret. It is shown once, so copy it straight into your secret store.
A key can be scoped to one game or left open to the whole company. A key scoped to a single game needs no further configuration, because the Reporter already knows which game the results belong to.
2. Download the Reporter
Section titled “2. Download the Reporter”Download the current release from the GameDriver portal:
https://portal.gamedriver.io/downloads
Look for Reporting and Analytics. Add the DLL to your test project as a reference. There is nothing else to install: the library depends only on the .NET base class library and on the NUnit your test project already uses.
3. Add two lines to your test project
Section titled “3. Add two lines to your test project”Both lines go in your own test assembly, not in a referenced library. NUnit only discovers hooks that live in the assembly being run, so a library cannot register them on your behalf.
// 1) Per-test capture. Put this at the top level of any file, for example AssemblyInfo.cs.[assembly: gdio.qaas.Reporter.Capture]
// 2) Upload once, after the whole run finishes.[OneTimeTearDown] public void QaaS() => gdio.qaas.Reporter.UploadCollected();The second line can live in an existing [OneTimeTearDown], or in a [SetUpFixture] if you prefer to keep it separate. It must run once per test run, not once per fixture.
4. Configure the environment variables
Section titled “4. Configure the environment variables”Set these where your pipeline keeps its secrets and variables. No test code reads them.
QAAS_API_KEY=<the key you were assigned>QAAS_PROJECT=<your game's slug>QAAS_HASH_SECRET=<any stable secret of your own>QAAS_PROJECT is only needed when your key covers the whole company rather than one game. You can find your game’s slug on the setup page in the QaaS portal, under Integrations > Test results.
The full set of variables:
| Variable | Required | Default | Purpose |
|---|---|---|---|
QAAS_API_KEY | Yes | – | Your key. If it is unset the Reporter does nothing at all. |
QAAS_PROJECT | No | – | Your game’s slug. Only needed for company-wide keys. |
QAAS_INGEST_URL | No | https://ingest.gamedriver.ai/v1/runs | The upload endpoint. The built-in default is correct; override it only for local testing. |
QAAS_HASH_SECRET | Recommended | – | Your own secret, used to hash test names. Keep it stable. |
QAAS_SHARE_DETAIL | No | false | Set to true to send real test names and failure messages. |
QAAS_EXECUTION_TYPE | No | automated | automated or manual. Keeps the two apart in your coverage figures. |
QAAS_FALLBACK_DIR | No | ./qaas-fallback | Where a failed upload’s payload is written so the run is not lost. |
Build number, branch and commit are detected automatically from GitHub Actions, Azure Pipelines, or the usual generic CI variables. You do not need to set them.
What gets sent
Section titled “What gets sent”By default the Reporter is deliberately conservative about what leaves your machine. It sends each test’s category, outcome, duration, and a hash of the test name computed with your QAAS_HASH_SECRET. Real test names, class names and failure messages stay local.
The hash is stable, so the same test produces the same value on every run and trends, flakiness and history all work normally. Every quality metric is calculated from category, outcome and duration, so the default mode gives you complete and accurate numbers.
Setting QAAS_SHARE_DETAIL=true additionally sends real test names, class names and failure messages, which is what populates the per-test detail views. It changes what you can see; it does not change what is measured.
Confirm it worked
Section titled “Confirm it worked”Run your suite once with the key set. A successful upload returns quickly and does not affect your test results or exit code.
In the QaaS portal, open Integrations > Test results > Set up. The bottom of that page shows the most recent run received for your games, with its test counts and the time it arrived. If your run is there, you are done, and the dashboards will reflect it.
Troubleshooting
Section titled “Troubleshooting”Nothing is uploaded and there is no error. QAAS_API_KEY is not set in the environment the tests actually run in. This is the designed behaviour, not a failure. Check that the variable reaches the test step itself rather than only the outer job. Running locally, the cause is nearly always an IDE that was started before the variable existed: Configuring QaaS Reporter Environment Variables explains why, and includes a one-test check that reports what the test host can see.
401 Unauthorized. The key is wrong, has been revoked, or was never revealed and copied correctly. Have an administrator confirm the key is still active, or issue a new one.
404 Project not found. The slug in QAAS_PROJECT does not match a game in your company, or the key is scoped to a different game. Check the slug on the setup page in the portal.
Uploads fail but the run is green. That is intentional. The Reporter never fails a test run. When an upload cannot complete, the payload is written to QAAS_FALLBACK_DIR so nothing is lost, and a message is written to the test output explaining why.
Everything lands under one category. Add [Category] attributes to your fixtures or tests. Without a category the Reporter has nothing to attribute a test to, and the by-domain breakdowns cannot be built.
.NET Framework projects throw a FileLoadException for System.Net.Http. This is a known .NET Framework issue with any .NET Standard library that uses HttpClient, not specific to GameDriver. Add the System.Net.Http NuGet package to your test project and make sure the binding redirect in your app.config points at the version you installed.
Unity projects cannot resolve the library. Set the project’s API compatibility level to .NET Standard 2.0 or .NET Standard 2.1 in Edit > Project Settings > Player. The older .NET Framework compatibility level does not load it.