Skip to content

Repository files navigation

Sim 360

Sim 360 diagram

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.

Getting started

Installing dependencies

  1. Make sure you have the latest version of the following installed:
    1. Yarn: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
    2. NodeJS: Install here 👉 https://nodejs.org/en
  2. Clone the sim360 repo
  3. Run yarn install to install the yarn dependencies / node modules

Compiling and running the project

You can build-and-run the simulation environment with one command:

yarn build:run

You can also...

  1. Compile using yarn run build
  2. Run a clean build using yarn run build:clean
  3. Start the simulation after compilation using yarn start

Adding a new simulation

  1. create a <simulation-name>.ts file in src/simulations/
  2. 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();}}),);};
  1. register your simulation in src/simulations/index.ts by adding it to the sims/ map.
  2. (temporary) pass in the name of the simulation you wish to run in src/index.ts:
(async()=>{awaitstartSim('yourSimulationName');// update})();
  1. Run yarn build:run to run your simulation.

TODOs

About

Simulation environment for the Scena 360 app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages