FOLIO integration test framework (UITEST-2)

[UITEST-4] Create hook in in ui-testing for invoking tests in ui module repos Created: 24/Aug/17  Updated: 01/Sep/17  Resolved: 24/Aug/17

Status: Closed
Project: stripes-testing
Components: None
Affects versions: None
Fix versions: None
Parent: FOLIO integration test framework

Type: Sub-task Priority: P3
Reporter: Niels Erik Nielsen Assignee: Niels Erik Nielsen
Resolution: Done Votes: 0
Labels: sprint21
Remaining Estimate: 30 minutes
Time Spent: 1 day
Original estimate: Not Specified

Issue links:
Relates
relates to UITEST-3 Move Items-only and Users-only tests ... Closed
Sprint:

 Comments   
Comment by Niels Erik Nielsen [ 24/Aug/17 ]

Initial version is taking shape:

  • a script in ui-testing that can invoke tests for a ui-module named in an argument to the script
  • references to that script in ui-testing package.json, can invoke one or multiple ui-modules' tests

For now requires that the ui-modules put their tests in a specific directory and file (will be ./test/ui-testing/test.js). The file name could be parameterized (so that some tests could be included in the overall ui-testing tests and others not for instance)

ui-testing would declare dependencies on the ui modules under test - could be releases or snapshots (see also FOLIO-798 Closed )

Comment by Niels Erik Nielsen [ 24/Aug/17 ]

A hook for running module tests from ui-testing is provided.

To run Users' tests for instance:

yarn install ui-testing

ui-testing must have a dependency on users in package.json:

  "dependencies": {
    "mocha": "^3.4.2",
    "nightmare": "^2.10.0",
    ....
    "@folio/items": "^1.9.0",
    "@folio/users": "^2.9.0"
  }

To run all @folio/users' tests (as declared in ui-users/test/ui-testing/test.js)

  yarn test-module -- -o --app=users

To run a specific test:

  yarn test-module -- -o --app=users:patron_group

To run tests from multiple UI modules - here all from checkout, two from users and one from items:

  yarn test-module -- -o --app=checkout/users:patron_group,new_user/items:new_item
Generated at Thu Feb 08 23:08:25 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.