Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-- FIle CLI option is not working as expected. File and test suite are executed simultaneously #289

Open
ayushj158 opened this issue Apr 28, 2020 · 1 comment

Comments

@ayushj158
Copy link

Requirement : Execute a setup file ( to generate access tokens) before starting parallel execution of test case.

Mocha provides a --file options which says: Specify file(s) to be loaded prior to root suite execution . The same CLI option is available for mocha-parallel-test but it does not work as expected. Setup file and test suite execution starts simultaneously.

Command :
mocha-parallel-tests --file specs/initializeEnv.js specs/TestProducts.js --require mocha-steps

Can you please help ?

Logs :
Valdiate the migration of Products from V5 to v2018.
**Products Test Execution **
1) Capture the Products configuration of v18 and v5.

Generate sessionID and Bearer token for making rest endpoint calls

Initializing
✓ Capture the authentication tokens for V18 and V5 APIC system (1986ms)

  1. Valdiate the migration of Products from V5 to v2018.
    Capture the Products configuration of v18 and v5.:
    Error: Rejecting promise, received status code:401from url:https://api.migration.apie.co.uk/api/catalogs/c4d60884-c366-44f6-bfe5-800d32971c8a/a7b8d0e2-3e89-4de5-9013-22f07d399cb7/products?fields=add(product)
@ayushj158 ayushj158 changed the title -- FIle CLI is working as expected. File is not executed before the executed of root test suite, they are executed in parallel -- FIle CLI option is not working as expected. File and test suite are executed simultaneously Apr 28, 2020
@ET-CS
Copy link

ET-CS commented Jun 8, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants