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

Add a simpler frontend for specifying a reporting format & making testcases #3

Open
akesterson opened this issue Apr 7, 2014 · 0 comments

Comments

@akesterson
Copy link
Owner

shunit leaves a lot to be desired in terms of its interface. Here's how I'd like to call it:

  • Specify what reporting format I want
  • For all of the testcases I have, call a gateway function that takes:
    • The kind of testcase I'm running (the test type)
    • The type of failure this will count as if it fails
    • A canned failure message to use if it fails
    • A function that represents the testcase, which the gateway function should use as a callback

Essentially:

shunit_start junit
shunit_testcase 'my_testcase_function' 'test_type' 'type_failure'
shunit_finish

... The assumption would be that the testcase function would return nonzero on failure, and would print out error information to stderr. This is a much easier way to handle reporting tests than the current methods (either call the header/testcase/footer functions yourself, or try to make a bunch of 'shunittest_' functions and magic them through the shunit tester).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant