Integration Tests · The itch.io app book - itch.io
https://itch.io/docs/itch/developing/integration-tests.html • 33 KB fetched Open original page
Integration Tests · The itch.io app book - itch.io Skip to main content itch.io
Browse Games Game Jams Upload Game Developer Logs Community
Log in Register
Indie game store Free games Fun games Horror games
Game development Assets Comics
Sales Bundles
Jobs
Tags Game Engines
itch app
Return to app
*
Introduction
*
User guide
*
Installing
*
Installing on Windows
*
Installing on macOS
*
Installing on Linux
*
Logging in
*
Using the app offline
*
Preferences
*
The sandbox
*
Windows sandboxing
*
macOS sandboxing
*
Linux sandboxing
*
Using a proxy
*
Downloading games
*
Install locations
*
Scanning for games
*
Linking an existing folder
*
Collections
*
Bundles
*
Launch settings
*
Steam shortcuts
*
Game developer guide
*
Quick start
*
Windows builds
*
macOS builds
*
Linux builds
*
Web builds
*
How updates work
*
App manifests
*
Manifest actions
*
Prerequisites
*
Visual C++ Runtime
*
.NET
*
XNA Framework
*
DirectX
*
Validating builds and manifests
*
API integration
*
Protocol URLs and automation
*
Compatibility policy
*
Troubleshooting
*
Contributor guide
*
How you can help
*
Getting started with the codebase
*
Integration Tests
*
Environment variables
*
Performance hacking
*
Continuous deployment
*
Butler TypeScript typings
*
Syncing translations
*
Dependencies (broth)
*
Appendix
*
Acknowledgements
*
Building Linux software into a prefix
*
*
Published with HonKit
Integration Tests
Integration tests
Integration tests exercise user flows like login, navigation, and game install against a running build of the app. They use a homegrown Go runner that drives the app via ChromeDriver (WebDriver).
Requirements
* Go to compile the test runner
* A desktop environment . On Linux CI, xvfb is used.
* An itch.io API key for the test account that integration tests authenticate as
The test runner downloads a specific ChromeDriver version that must match the Electron version used by the app. If you bump Electron in package.json , also update integration-tests/versions.go .
Running integration tests
# API key for the test account
export ITCH_TEST_ACCOUNT_API_KEY= "your-api-key"
# Run against a packaged build
npm run integration-tests
# Run against the dev version (faster, no packaging step)
node release/test.js --test-dev
To start fresh, clear the cached ChromeDriver and test artifacts:
rm -rf integration-tests/.chromedriver integration-tests/tmp integration-tests/screenshots
If you're an itch.io employee, ask the team about getting an API key for the test account. Open-source contributors aren't expected to run the integration suite locally; CI will run them on your PR.
Writing an integration test
Scenarios live in integration-tests/ alongside the runner support code. They're explicitly listed in integration-tests/main.go .
References:
* The WebDriver API docs
* Existing tests in the integration-tests/ directory
results matching " "
No results matching " "