Skip to content

Testing the multiplayer Tic-Tac-Toe game with Playwright framework

Notifications You must be signed in to change notification settings

marko-simic/test-tic-tac-toe-game

Repository files navigation

Automation tests for the Multiplayer-Tic-Tac-Toe game

I've created automation tests to demonstrate how easy it is to simulate multiple players playing in real-time with the Playwright framework.

Test suite

  • ✓ game.spec.js:4:3 › Tic Tac Toe › Cross should win (2s)
  • ✓ game.spec.js:27:3 › Tic Tac Toe › Circle should win (2s)
  • ✓ game.spec.js:51:3 › Tic Tac Toe › The game should be drawn (1s)

Two parallel independent browser sessions

Cross
Cross player
Circle
Circle player

How to run locally

  1. Install Node.JS.
  2. Clone the repository or download it.
  3. Browse the project repository on your command prompt or terminal.
  4. Run npm install to install dependencies defined in package.json.
  5. Run npx playwright test to execute tests
  6. Or run npx playwright test --headed to execute tests with open browsers

Multiplayer-Tic-Tac-Toe Game

I tested here the Tic-Tac-Toe Game developed using Node.js, Express.js and Socket.io by Pranjali Bajpai and all credits go to her.

Enjoy! 😃

About

Testing the multiplayer Tic-Tac-Toe game with Playwright framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published