-
Notifications
You must be signed in to change notification settings - Fork 124
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
"MochaAllure: "step" can't be used in parallel mode!" log while starting test in single thread mode #753
Comments
What version of |
version 2.5.0 |
Could you please share a sample project in the form of a GitHub repo to reproduce the problem? |
@baev I added you as collaborator to my sample repo, where error is reproducible, take a look please |
Have discovered, a moment ago, that the reporter works correctly without As a temp solution, I can propose to use only Keep searching for the true solution. |
You can see a proposed solution here. The issue relates to |
I turned off multi-reporters and still the same issue. By the way, it happens only when i use step() function. If i don't use it everything works fine, but i need to define my own steps. my .mocharc |
Tried to use step in the code with configuration you send above and it works: describe('Dummy', async () => {
it('Dummy test' ,async () => {
testLogger.info('Step 1. Generate random string')
const dummyId = generateRandomNUMString(1, 10);
testLogger.info(dummyId)
testLogger.info('Step 2. Send get with random string')
expect(1).eq(1)
const resp = await axiosHelper.sendGetToUrl(`https://dummy.restapiexample.com/api/v1/employee/${dummyId}`)
+ await allure.step("example step", async () => {
+ return true
+ })
testLogger.info('Step 3. Check id the in response')
expect(resp.data.data.id).eq(Number(dummyId))
})
}) The test result file is: {
"uuid": "cd650e77-5749-4df1-9483-bd1687728bd4",
"historyId": "6baf33fa583578a84b20a7b948ddba0b",
"status": "broken",
"statusDetails": {
"message": "Cannot read properties of undefined (reading 'data')",
"trace": "TypeError: Cannot read properties of undefined (reading 'data')\n at Context.<anonymous> (tests/DummySuite/dummy.spec.ts:22:21)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"
},
"stage": "finished",
"steps": [
{
"statusDetails": {},
"stage": "running",
+ "steps": [
+ {
+ "status": "passed",
+ "statusDetails": {},
+ "stage": "finished",
+ "steps": [],
+ "attachments": [],
+ "parameters": [],
+ "start": 1692694404826,
+ "name": "example step"
+ }
+ ],
"attachments": [],
"parameters": [],
"start": 1692694404817,
"name": "sendGetToUrl"
}
],
"attachments": [],
"parameters": [],
"labels": [
{
"name": "package",
"value": "tests.DummySuite"
},
{
"name": "parentSuite",
"value": "Dummy"
}
],
"links": [],
"start": 1692694404816,
"name": "Dummy test",
"fullName": "Dummy test",
"stop": 1692694404828
} |
is there some update on this? I do not use |
Could you send your |
.mocharc.cjs
I use ts-node/typescript to write my tests and my package.json is Log:
|
Also having this issue, the log file is being peppered with errors anytime an allure.function is being called, despite the fact that parallel = false in mocharc config. The allure calls like allure.suite or allure.attachment work, they're being added to the report this however:
won't work, anything code inside the step just won't run, it's completely bypassed when debugging |
Hi, everyone! If that's not the case and you're still facing problems accessing the API, please open a new issue and provide an example to reproduce. |
Describe the bug
When I start test in single thread mode, i see the log with the following message:
MochaAllure: "step" can't be used in parallel mode! To use Allure Runtime API, please, switch back to single thread mode.
And after this test fails.
Mocha config:
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: