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

Need to Skip test cases under a fixture If previous test of the same fixture failed #8335

Open
SamShot81 opened this issue Nov 5, 2024 · 0 comments
Labels
STATE: Need response An issue that requires a response or attention from the team. TYPE: enhancement The accepted proposal for future implementation.

Comments

@SamShot81
Copy link

What is your Scenario?

I am working with a situation where I have the following scenario/steps to Test

  1. Create
  2. Edit
  3. Delete

I have the test cases ready but I need a way to skip the Edit and Delete TCs if the Create TC fails. In other words I need to chain them together so the system understands that if Create was not successful then skip the Edit and Delete test cases (Conditional Skipping).

Is it possible with any existing process like hooks/test Context?

Is there any logic I can use to make this happen?

Thanks in Advance.

Expecting something like below

What are you suggesting?

test('Verify Create New Account Functioning Successfully', async (t: TestController) => {
    // if this fails, I can set a variable x=fail
});

test('Verify Edit Account Functioning Successfully', async (t: TestController) => {
    // Skip this as create test case failed
    if(x == fail) {
        test.skip(t.this test);
    }
});

What alternatives have you considered?

Could not find any material regarding this in testcafe documentation.

Additional context

No response

@SamShot81 SamShot81 added the TYPE: enhancement The accepted proposal for future implementation. label Nov 5, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need response An issue that requires a response or attention from the team. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

1 participant