Skip to content

Debugging E2E Tests

Sean Moore edited this page Mar 31, 2021 · 8 revisions

To debug using Saucelabs (required for visual regression):

Preconditions: setup Saucelabs according to instructions here.

  1. Open the Travis log and read which component’s tests failed
  2. In your IDE, go to the wdio.conf.js file
  3. Change the config to meet your debugging needs (specify component, browser/OS)
    • i.e. specs: [ './e2e/wdio/<platform/core>/**/<failing-spec-name>.e2e-spec.ts', ]
  4. Run the test through Saucelabs
    • start app: ng serve --disable-host-check --ssl --no-watch
    • run tests: npm run e2e:wdio:saucelabs
  5. Check the results
    • Locally: check your IDE terminal logs
    • Saucelabs:
      • Go to Saucelabs using SSO
      • Click on the tab ‘automated’
      • Click on 'Test Results'
      • Choose your test run from the list

To debug locally:

  1. Open the Travis log and read which component’s tests failed
  2. In your IDE, go to the wdio-local.conf.js file
  3. Change the config to meet your debugging needs (specify component, browser/OS)
    • i.e. specs: [ './e2e/wdio/<platform/core>/**/<failing-spec-name>.e2e-spec.ts', ]
  4. Run the test locally
    • serve app locally: npm run start
    • run tests: npm run e2e:wdio:local
  5. Check the log to see if there is additional info about failed tests

Additional

E2E tests are located in the e2e/wdio/<platform/core>/tests folder

To run a specific case within a suite, you can add an ‘f’ in front of the ‘describe’ or ‘it’ which you want to run.

  • describe -> fdescribe
  • it -> fit

Clone this wiki locally