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

Provide some "step" API #16

Open
lefou opened this issue Sep 8, 2017 · 0 comments
Open

Provide some "step" API #16

lefou opened this issue Sep 8, 2017 · 0 comments

Comments

@lefou
Copy link
Owner

lefou commented Sep 8, 2017

The idea is the following: You have some longer buisiness logic, e.g. a workflow, and you want to make sure, that each step of that workflow passes some tests. In case of a failure, you want to exactly now, which step failed. Also, you want to see the steps in the test passed output.

The API should feel like this:

test("Some complex workflow", () -> {
  step("init the system", () -> {
    // do some work and some asserts
    step("next workflow step", () -> {
      // do some more work, including further tests / asserts
      // of course you can access state and results of previous steps
      ...
    }
  }
}

The output might look something like:

Running 1 test in org.example.SimpleTest:
-- Some complex workflow
---- SUCCESS Step 1: init the system
---- SUCCESS Step 2: next workflow step
-- SUCCESS Some complex workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant