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

Bug: Test steps are not tracked in the generated report #268

Open
sanoj-s opened this issue Aug 31, 2023 · 1 comment
Open

Bug: Test steps are not tracked in the generated report #268

sanoj-s opened this issue Aug 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sanoj-s
Copy link

sanoj-s commented Aug 31, 2023

Describe the bug
Test steps are not tracked in the generated report.

The following are the dependencies:

"dependencies": {
"testcafe": "^2.6.2"
}

"devDependencies": {
"allure-commandline": "^2.24.0",
"testcafe-reporter-allure": "npm:@isaac.frontend/testcafe-reporter-allure@^2.4.1"
}

The script is,

import step from 'testcafe-reporter-allure';

fixture('TestCafé Example Fixture - Documentation').page('http://devexpress.github.io/testcafe/example')

test.meta({
severity: 'Trivial',
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
// ... any other key: value property as custom metadata
})('Example test with metadata', async (t) => {
// Test Code
});

// Skipped test example
test.meta({
severity: 'Trivial',
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
skipReason: 'Skipped: Known product bug BUG-ISSUE-1'
// ... any other key: value property as custom metadata
}).skip('Example test with metadata', async (t) => {
// Test Code
});

// Skipped test example
test.meta({
severity: 'Trivial',
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
skipReason: 'Skipped: Not implemented'
// ... any other key: value property as custom metadata
}).skip('Example planned test', async (t) => {
// Test Code
});

test.meta({
severity: 'Trivial',
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
tags: ['automated', 'smoke', 'e2e']
// ... any other key: value property as custom metadata
})('Example test with metadata', async (t) => {
// Test Code
});

test.meta({
severity: 'Trivial',
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
tags: 'e2e'
// ... any other key: value property as custom metadata
})('Example test with metadata where tag can be a string', async (t) => {
// Test Code
});

test('Example test with steps', async (t) => {
await step('Add developer name to form', t,
t.typeText('#developer-name', 'John Smith')
);
});

Expected behavior
The test step Add developer name to form should be tracked in the report.

Screenshots
image

Environment (please complete the following information):

  • OS: [e.g. Windows]
  • Browser: Chrome
  • Browser Version: 116
  • testcafe-reporter-allure version: npm:@isaac.frontend/testcafe-reporter-allure@^2.4.1

Let me know if I am missing any additional steps.

Thanks,
Sanoj Swaminathan

@sanoj-s sanoj-s added the bug Something isn't working label Aug 31, 2023
@sanoj-s sanoj-s closed this as completed Sep 1, 2023
@sanoj-s sanoj-s reopened this Sep 1, 2023
@skifzp
Copy link

skifzp commented Oct 1, 2024

I have the same issue.
I really don understand how it can work because follow import

import step from 'testcafe-reporter-allure';

does not return 'step' method, it returns object of many properties:

declare const _default: () => {
allureReporter: any;
allureConfig: any;
getReporter(): any;
preloadConfig(allureConfig: AllureConfig): void;
reportTaskStart(startTime: Date, userAgents: string[]): Promise;
reportFixtureStart(name: string, path: string, meta: object): Promise;
reportTestStart(name: string, meta: object): Promise;
reportTestDone(name: string, testRunInfo: TestRunInfo, meta: object): Promise;
reportTaskDone(): Promise;
};
export default _default;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants