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

Service is not initialized (Mocha or Cucumber + JS (Node 16.17.0) + WDIO) #6

Open
HannaTarasevich opened this issue Sep 14, 2022 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@HannaTarasevich
Copy link

HannaTarasevich commented Sep 14, 2022

Hi! I dealt with the issue that service is not initialized (Mocha or Cucumber + JS (Node 16.17.0) + WDIO).
Analyzed both issues (#1 and #4 ), checked the logs and there are no any data about the service.
I use WDIO example files as a basis for verification and Azure trial subscription, I got appropriate responses using data from Azure API.
My config looks like:

services: ['chromedriver','geckodriver',
  [AzureDevopsService,
  {
      pat: 'pat',
      organizationUrl: 'https://dev.azure.com/org',
      projectId: '8b3c68ac-f69d-41c6-bbad-921d8bae9819',
      planId: 6,
      suiteId: 8,
      caseIdRegex: '@?[ref](https://github.com/gianlucamangiapelo/wdio-azure-devops-service/blob/master/\\d+)',
      runName: 'FE regression tests for TestPlan',
  },

I tried to delete and change this key caseIdRegex, and there was no success.

2022-09-14T18:24:31.827Z INFO @wdio/local-runner: Run worker command: run
2022-09-14T18:24:31.829Z DEBUG @wdio/config:ConfigParser: No compiler found, continue without compiling files
2022-09-14T18:24:31.976Z DEBUG @wdio/local-runner:utils: init remote session
2022-09-14T18:24:31.979Z DEBUG @wdio/utils:initialiseServices: initialise service "chromedriver" as NPM package
2022-09-14T18:24:32.030Z DEBUG @wdio/utils:initialiseServices: initialise service "geckodriver" as NPM package
2022-09-14T18:24:32.071Z DEBUG @wdio/utils:initialiseServices: initialise custom initiated service
2022-09-14T18:24:32.086Z INFO geckodriver: Start Geckodriver (C:\azure-pipelines\node_modules\geckodriver\geckodriver.exe) with args: --log=trace --port=59070

image

Example of scenario:

Feature: The Internet Guinea Pig Website

@C5
Scenario Outline: As a user, I can log into the secure area

Tokens were generated with Full access and with Test Plan management, no changes

@HannaTarasevich HannaTarasevich changed the title Service is not initialized (Mocha and Cucumber + JS (Node 16.17.0) + WDIO) Service is not initialized (Mocha or Cucumber + JS (Node 16.17.0) + WDIO) Sep 14, 2022
@gianlucamangiapelo
Copy link
Owner

Ciao @HannaTarasevich thanks for reaching me!
I'm investigating to replicate the environment that you suggested.

In the meanwhile,
have you tried just with Scenario Outline or also with Scenario?

@gianlucamangiapelo gianlucamangiapelo added the help wanted Extra attention is needed label Sep 27, 2022
@HannaTarasevich
Copy link
Author

Hi @gianlucamangiapelo,
I tried with scenarios as well as scenario outlines.
I'm still experiencing the issue.
Please let me know if I can help you with additional info.
Thanks

@gianlucamangiapelo
Copy link
Owner

Hi, @HannaTarasevich did you find a solution to resolve the issue?

@alex255
Copy link

alex255 commented Mar 24, 2023

Hello, any update ? I have the same problem

@rakeshbs890
Copy link

rakeshbs890 commented Jun 6, 2023

Hi @gianlucamangiapelo,

I am also facing similar kind of issue, i can see from logs that service is able to connect to Azure DevOps test plan.
But on execution completion, getLastTestRunId() call is failling to get test runs (getTestRuns(azureConfig.projectId, undefined, undefined, undefined, azureConfig.planId, undefined, undefined, undefined);)
Throwing un-know error as test run are not returned.
function getLastTestRunId(azureClient, azureConfig) {
return __awaiter(this, void 0, void 0, function* () {
const testRun = yield azureClient.getTestRuns(azureConfig.projectId, undefined, undefined, undefined, azureConfig.planId, undefined, undefined, undefined);
if (!testRun || !testRun.length) {
throw new Error();
}
testRun.sort((a, b) => a.id - b.id);
return testRun[testRun.length - 1].id;
});
}
exports.getLastTestRunId = getLastTestRunId;

Please help with solution

Thanks in advance

@paurushtaunk
Copy link

Hi @gianlucamangiapelo ,
When i use this Service and try to run the WDIO test, In Azure Test Plans the test case is getting marked as "Not Applicable" instead of fail or pass

@sundarlogan
Copy link

Hi @paurushtaunk @gianlucamangiapelo

I am also, facing same issue - In Azure Test Plans the test case is getting marked as "Not Applicable" instead of fail or pass. Any updates that worked? Pls. let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants