I have 3 tests file, i want to run 2 in single instance one after another in same session, so i have created the spec array in wdio.conf.js
it looks like this:
specs: [
"./test/specs/features/login/login.feature",
[
"./test/specs/features/datalanding/webhook.feature",
"./test/specs/features/datalanding/fileupload.feature",
],
],
But when i run this It executes the tests twice which are under spec array , i am not getting why its happening. Helps are appreciated.
Sharing execution log as well:
------------------------------------------------------------------
[chrome 109.0.5414.119 linux #0-0] Running: chrome (v109.0.5414.119) on linux
[chrome 109.0.5414.119 linux #0-0] Session ID: 4b911445cedd74226c013b618511d843
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] » /test/specs/features/login/login.feature
[chrome 109.0.5414.119 linux #0-0] Login to Mammoth
[chrome 109.0.5414.119 linux #0-0] User can login and navigate to landing page
[chrome 109.0.5414.119 linux #0-0] User logs in with invalid credentials
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on the Mammoth home page
[chrome 109.0.5414.119 linux #0-0] ✓ When User enter invalid "selenium2@mammoth.io" and invalid "invalidpassword" and click on login button
[chrome 109.0.5414.119 linux #0-0] ✓ Then User should see an "Email address or Password incorrect." on the login page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User logs in with valid credentials
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on the Mammoth home page
[chrome 109.0.5414.119 linux #0-0] ✓ When User enter valid username and valid password and click on login button
[chrome 109.0.5414.119 linux #0-0] ✓ Then User should be redirected to the Mammoth landing page
[chrome 109.0.5414.119 linux #0-0] ✓ And The Mammoth logo should be displayed
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User can login and navigate to landing page
[chrome 109.0.5414.119 linux #0-0] User logs in with invalid credentials
[chrome 109.0.5414.119 linux #0-0] ✓ User is on the Mammoth home page
[chrome 109.0.5414.119 linux #0-0] ✖ User enter invalid "selenium2@mammoth.io" and invalid "invalidpassword" and click on login button
[chrome 109.0.5414.119 linux #0-0] - User should see an "Email address or Password incorrect." on the login page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User logs in with valid credentials
[chrome 109.0.5414.119 linux #0-0] ✓ User is on the Mammoth home page
[chrome 109.0.5414.119 linux #0-0] ✖ User enter valid username and valid password and click on login button
[chrome 109.0.5414.119 linux #0-0] - User should be redirected to the Mammoth landing page
[chrome 109.0.5414.119 linux #0-0] - The Mammoth logo should be displayed
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] » /test/specs/features/datalanding/webhook.feature
[chrome 109.0.5414.119 linux #0-0] Webhook
[chrome 109.0.5414.119 linux #0-0] User can Create Webhook Dataset
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook successfully
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ When User enters a name for the webhook as "WebhookSanity"
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the "WebhookSanity" on the landing page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook in Replace mode
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ When User enters a name for the webhook as "WebhookReplace"
[chrome 109.0.5414.119 linux #0-0] ✓ When User selects the "Replace" mode in webhook
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the "WebhookReplace" on the landing page
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the selected mode as "Replace" under the preview section
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook in Combine mode
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ When User enters a name for the webhook as "WebhookCombine"
[chrome 109.0.5414.119 linux #0-0] ✓ When User selects the "Combine" mode in webhook
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the "WebhookCombine" on the landing page
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the selected mode as "Combine" under the preview section
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User closes the Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Cancel" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then Add data modal should be closed successfully
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User can Create Webhook Dataset
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ User enters a name for the webhook as "WebhookSanity"
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the "WebhookSanity" on the landing page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook in Replace mode
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ User enters a name for the webhook as "WebhookReplace"
[chrome 109.0.5414.119 linux #0-0] ✓ User selects the "Replace" mode in webhook
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the "WebhookReplace" on the landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the selected mode as "Replace" under the preview section
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User creates a new webhook in Combine mode
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ User enters a name for the webhook as "WebhookCombine"
[chrome 109.0.5414.119 linux #0-0] ✓ User selects the "Combine" mode in webhook
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ The webhook should be created successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the "WebhookCombine" on the landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the selected mode as "Combine" under the preview section
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User closes the Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the webhook creation modal
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Cancel" button
[chrome 109.0.5414.119 linux #0-0] ✓ Add data modal should be closed successfully
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] » /test/specs/features/datalanding/fileupload.feature
[chrome 109.0.5414.119 linux #0-0] File Upload
[chrome 109.0.5414.119 linux #0-0] User can upload a file successfully
[chrome 109.0.5414.119 linux #0-0] User uploads a file successfully
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ And User uploads a file "sampleFileUpload.csv"
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then User should see a toast notification showing sampleFileUpload.csv is being uploaded
[chrome 109.0.5414.119 linux #0-0] ✓ Then The file should be uploaded successfully
[chrome 109.0.5414.119 linux #0-0] ✓ And User should see the "sampleFileUpload.csv" on the landing page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User uploads a file with an invalid format
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ And User uploads a file "localhost.jpeg"
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then The file should not be uploaded and the user should see an error message "File is in the wrong format."
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User uploads a file that exceeds the maximum file size
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ And User uploads a file "largeDataFile.csv"
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then The file should not be uploaded and the user should see an error message "File exceeds size limit."
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User closes the Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ Given User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ When User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ And User clicks the "Cancel" button
[chrome 109.0.5414.119 linux #0-0] ✓ Then Add data modal should be closed successfully
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User can upload a file successfully
[chrome 109.0.5414.119 linux #0-0] User uploads a file successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User uploads a file "sampleFileUpload.csv"
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ User should see a toast notification showing sampleFileUpload.csv is being uploaded
[chrome 109.0.5414.119 linux #0-0] ✓ The file should be uploaded successfully
[chrome 109.0.5414.119 linux #0-0] ✓ User should see the "sampleFileUpload.csv" on the landing page
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User uploads a file with an invalid format
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User uploads a file "localhost.jpeg"
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ The file should not be uploaded and the user should see an error message "File is in the wrong format."
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User uploads a file that exceeds the maximum file size
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User uploads a file "largeDataFile.csv"
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Submit" button
[chrome 109.0.5414.119 linux #0-0] ✓ The file should not be uploaded and the user should see an error message "File exceeds size limit."
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] User closes the Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User is on data landing page
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks Add Data modal
[chrome 109.0.5414.119 linux #0-0] ✓ User clicks the "Cancel" button
[chrome 109.0.5414.119 linux #0-0] ✓ Add data modal should be closed successfully
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] 103 passing (5m 3.5s)
[chrome 109.0.5414.119 linux #0-0] 2 failing
[chrome 109.0.5414.119 linux #0-0] 3 skipped
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] 1) User logs in with invalid credentials User enter invalid "selenium2@mammoth.io" and invalid "invalidpassword" and click on login button
[chrome 109.0.5414.119 linux #0-0] Error: Can't call setValue on element with selector "#username" because element wasn't found
[chrome 109.0.5414.119 linux #0-0] Error: Can't call setValue on element with selector "#username" because element wasn't found
[chrome 109.0.5414.119 linux #0-0] at async LoginPage.login (file:///home/mahadev/Documents/Mammoth/mammoth_ui_tests/test/pageobjects/loginpage/login.page.js:41:9)
[chrome 109.0.5414.119 linux #0-0] at async World.<anonymous> (file:///home/mahadev/Documents/Mammoth/mammoth_ui_tests/test/specs/features/steps/login/login.steps.js:14:5)
[chrome 109.0.5414.119 linux #0-0]
[chrome 109.0.5414.119 linux #0-0] 2) User logs in with valid credentials User enter valid username and valid password and click on login button
[chrome 109.0.5414.119 linux #0-0] Error: Can't call setValue on element with selector "#username" because element wasn't found
[chrome 109.0.5414.119 linux #0-0] Error: Can't call setValue on element with selector "#username" because element wasn't found
[chrome 109.0.5414.119 linux #0-0] at async LoginPage.login (file:///home/mahadev/Documents/Mammoth/mammoth_ui_tests/test/pageobjects/loginpage/login.page.js:41:9)
[chrome 109.0.5414.119 linux #0-0] at async World.<anonymous> (file:///home/mahadev/Documents/Mammoth/mammoth_ui_tests/test/specs/features/steps/login/login.steps.js:20:5)
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:05:06
2023-03-02T11:06:17.000Z INFO @wdio/local-runner: Shutting down spawned worker
2023-03-02T11:06:17.251Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-03-02T11:06:17.252Z INFO @wdio/local-runner: shutting down