Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce scenarios #240

Open
dieseldeesh opened this issue Apr 21, 2022 · 1 comment
Open

Introduce scenarios #240

dieseldeesh opened this issue Apr 21, 2022 · 1 comment

Comments

@dieseldeesh
Copy link
Contributor

For the debug app, it would be nice to be able to be able to define scenarios and have certain actions executed step by step. For example, there could be a scenario to login (creates a user). Then another scenario to join a game. These scenarios can be chained to bootstrap the debug app with many users in a game with certain configurations. This could also be useful for writing tests.

@hpx7
Copy link
Member

hpx7 commented Apr 21, 2022

Thanks for the suggestion!

A new command I added is hathora save <stateId> <saveName>. This command creates a save file from the stateId by copying over the replay log into the data/saves directory. The idea is that you can then load this file up using hathora load <saveName> and it will open up a browser tab per user from the save file so that you can resume testing where you left off. I also want to add a command hathora generateTest <saveName> which generates a test file which includes all the client method calls and asserts on the state values at the end.

Does that scratch the itch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants