Skip to main content

TestX Web WDIO

This package is a GenesisX-themed TypeScript application template generator that offers a smooth integration with TestX accelerator of PSInnersource

Usage

To integrate TestX Automation framework in the apps generated by GenesisX, you can follow the steps outlined below:

Pre-requisites

  • Make sure you are on correct version of Nodejs 18.x and Nx Version 16.6
    node --version
    nx --version
  • To start with, create a new GenesisX workspace in an empty directory, run below command, of if you already have the workspace ready , please skip this step.
    npx @genesisx/create-workspace
    • Provide the requested parameters
    • Provide name to your workspace like test-workspace
    • Move to the created workspace - cd test-workspace
    • Install the packages
      yarn install
  • Install TestX-web-wdio package
    yarn add @genesisx/testx-web-wdio
  • Now follow either of the two modes(mentioned below) to use this generator - either the Nx Console or CLI

Via Nx Console

  • Select Nx Console > Generate > Search for @genesisx/testx-web-wdio
    • Provide the requested parameters:
    • appName: name of the application
    • port: port on which application needs to be run
    • docs: docs (url) of the application
    • style: file extension to be used for style files
  • Click on Run

Testing

  • To serve the generated app -
    • Select serve from the Nx Console > Choose the app to be served > Select the appropriate options > Run
  • To build the generated app -
    • Select build from the Nx Console > Choose the app to be built > Select the appropriate options > Run
  • To run lint on the generated app -
    • Select lint from the Nx Console > Choose the app to execute linting > Select the appropriate options > Run
  • To run unit tests on the generated app -
    • Select test from the Nx Console > Choose the app to be tested > Select the appropriate options > Run

Via Command line

  • If Nx Console doesn't work, alternatively use this command:

    nx generate @genesisx/testx-web-wdio:templated <appName> --no-interactive

Testing

  • To serve the generated app -

    nx serve testx-web-wdio

Running build and lints

  • To build the generated app, run -

    nx build testx-web-wdio
  • To run lint on the generated app, run -

    nx lint testx-web-wdio
  • To run unit tests on the generated app via Jest, run -

    nx test testx-web-wdio

More details & Troubleshooting

Visit the troubleshooting guide for common issues or refer to the readme.md file located within the package folder <workspace-folder>/node_modules/@genesisx/testx-web-wdio/README.md