This is a documentation for Board Game Arena: play board games online !
Testing by developer
When you develop a game you obviously have to test it, this page collects the info about testing in one place
Manual Testing on BGA
For manual testing the most important things to know are:
- how to start/stop game in one click
- how to switch between players in one click
- how to save/restore the game state
- how to construct the game state automatically
All of these described here https://en.doc.boardgamearena.com/Tools_and_tips_of_BGA_Studio
There is also HUGE checklist of things you need to test manually which you may not even think about, defined here https://en.doc.boardgamearena.com/Pre-release_checklist
Manual Testing locally
HTML/CSS At this era the file sync is almost instant so you do not save much by doing this locally, however if internet is a challenge - here are some tips https://en.doc.boardgamearena.com/Tools_and_tips_of_BGA_Studio#Speed_up_CSS_development_and_layout
PHP You can run and debug php locally using tip https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Creating_a_test_class_to_run_PHP_locally
Automated Testing
JavaScript
I did not try for pure java script, it works for typescript. You need dev dependency on mocha, jsdom and sinon and some other build tools. Typescript code lives in src/. Test code lives in src/tests/. Tests have their own src/tests/tsconfig.json File src/tests/setup.ts contains framework and global stubs that tests need. The config is very verbose so I did not copy it here, if interested check project "dojoless" or bga-dojoless on github (https://github.com/elaskavaia/bga-dojoless).
PHP
See https://doc.studio.boardgamearena.com/framework-documentation/back-end/php-unit-testing/
Play testing on studio
To play test on studio you can use your test accounts dev0... dev9. You can give some of these account to other people just make sure you change the password. You should not encourage other people who are not developers to create studio account, this is against bga policy.