Sim 360 is the evolution of Scena 360's testing framework – coverage360. The main difference between the two projects is this one uses Playwright instead of Puppeteer w/ Jest.
This repository serves as an example for configuring an E2E testing system or simulation environment for your web application, particularly 3D ones that rely on technologies like A-Frame and Three.js.
- Make sure you have the latest version of the following installed:
- Yarn: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
- NodeJS: Install here 👉 https://nodejs.org/en
- Clone the sim360 repo
- Run
yarn installto install the yarn dependencies / node modules
You can build-and-run the simulation environment with one command:
yarn build:run
You can also...
- Compile using
yarn run build - Run a clean build using
yarn run build:clean - Start the simulation after compilation using
yarn start
- create a
<simulation-name>.tsfile insrc/simulations/ - add the following boilerplate to your new simulation file
exportconstyourSimulationName=async()=>{awaitPromise.all(// specify browser types which you wish to launch[playwright.chromium].map(asyncbrowserType=>{const{ browser, page }=(awaitlaunchPage(browserType))!;try{awaitjoinRoom({ browser, page });// do stuff once avatar has entered the room}finally{browser.close();}}),);};- register your simulation in
src/simulations/index.tsby adding it to thesims/map. - (temporary) pass in the name of the simulation you wish to run in
src/index.ts:
(async()=>{awaitstartSim('yourSimulationName');// update})();- Run
yarn build:runto run your simulation.
- Setup example with Playwright Test Runner
- Document Docker set up and deployment to AWS instructions
- Add documentation video and audio mocking
