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

use a proper test reporter #46

Open
Thecarisma opened this issue Mar 3, 2021 · 0 comments
Open

use a proper test reporter #46

Thecarisma opened this issue Mar 3, 2021 · 0 comments

Comments

@Thecarisma
Copy link
Member

OK, the current test reporter is garbage and not easy to manage at all. I am looking at portion the library to systems with very small memory and interfaces hence there might be a need to remote failures or errors in a non-textual way, e.g. on andruino failure can be reported with red light and success can be reported with a green light.

e.g.
To report the test execution on andruino using a red and green led

CESTER_REPORTER_FINAL(_, exit_code, {
     if (exit_code == EXIT_SUCCESS) {
         digitalWrite(GREEN_LED_BUILTIN, HIGH);
         return;
    }
    digitalWrite(RED_LED_BUILTIN, HIGH);
});

In the current implementation it possible but that will be a crazy task to achieve, with a proper reporter interface that will be easily achievable and more test report format like subunit, key-value can be easily integrated.

Also, the new report should provide an interface to intercept or/and allow the creation of custom reports.

CESTER_REPORTER_EXPECT_ACTUAL(cr1, pass, test_case, expect, actual, {
     if (pass == 1) {
         printf("The test in test case %s passes --- expected %s received %s\n", test_case->name, expect, actual);
    }
});
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