Skip to content

finmars-platform/finmars-playwright

Repository files navigation

Finmars E2E Tests with Playwright

This project contains automated end-to-end tests for the Finmars web application, utilizing Playwright for browser automation and testing.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Before running the tests, ensure you have Node.js installed on your system. You can download it from Node.js official website.

Installing

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Install the required dependencies by running:
npm install
  1. Install Playwright browsers:
npx playwright install --with-deps

Running the Tests

You can run different sets of tests using the scripts defined in package.json. Here are the commands for running specific test suites:

  • To run all tests:
npm run test
  • To run configuration tests:
npm run configuration
  • To run reports tests:
npm run reports

Continuous Integration

This project uses GitLab CI/CD for continuous integration and deployment. The CI pipeline is defined in .gitlab-ci.yml, which includes steps for:

  • Installing dependencies.
  • Running tests across different environments.
  • Generating and storing test reports.

Reporting

Test results are generated in the playwright-report directory, with an HTML report for viewing in a web browser. Additionally, JUnit reports are generated for integration with CI systems.

Contributing

If you have to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Write your code and add tests if applicable.
  4. Ensure your code passes existing tests.
  5. Submit a pull request with a clear description of your changes.

Useful Playwright Commands

This section lists some common Playwright commands that are useful during development and testing.

  • Run all tests: Executes all test suites.

    npx playwright test
  • Run tests in a specific file: Executes tests in a specified test file.

    npx playwright test path/to/test-file.spec.js
  • Run tests with a specific tag: Executes tests marked with a specific tag.

    npx playwright test -g @yourTag
  • Run tests in headed mode: Executes tests in a browser with UI.

    npx playwright test --headed
  • Generate code coverage: Generates code coverage report.

    npx playwright test --coverage
  • Open Playwright Inspector: Opens the Playwright Inspector for debugging tests.

    npx playwright codegen
  • Update browsers: Downloads or updates browsers used by Playwright.

    npx playwright install

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors