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

API - Test Runner #6

Open
matejicko opened this issue Aug 7, 2024 · 0 comments
Open

API - Test Runner #6

matejicko opened this issue Aug 7, 2024 · 0 comments
Labels
proposal Proposal of some functionality

Comments

@matejicko
Copy link
Collaborator

matejicko commented Aug 7, 2024

By default, runner takes all test cases and run them in alphabetical order by their names. Althought, you can manipulate with the order. You can do it even during run-time. For these purposes, you can use these methods:

public void NextTestCase(string testName); // Test case that will run next
public void NextFolder(string folderName); // Folder that will run next
public void SkipTestCase(string testName); // Test case to be ignored/skipped
public void SkipTestCases(params string[] testNames); // Test cases to be ignored/skipped
public void SkipFolder(string folderName); // Folder to be skipped at all

These methods can be especially useful, when Response contains values that alter next behavior, or when tests failed and next request(s) don't make sense anymore.

Be careful with these methods, since you can cause endless loop!

If you want to specify order of tests at once, you can do it by using this method:

tp.ConfigureRunner(runner => {
    runner.SetOrder(
        "Test 1",
        "Test 25",
        "Auto Test");

    runner.Skip(
        "Ignor Me Test",
        "Test 0"
    );
})
@matejicko matejicko changed the title API - Test Runner Module API - Test Runner Aug 7, 2024
@matejicko matejicko added the proposal Proposal of some functionality label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal of some functionality
Projects
None yet
Development

No branches or pull requests

1 participant