-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature request: Better unit testing of plugins #26
Comments
I like the idea of putting the testing code as close to the plugin being tested as possible, e.g. in the JEventProcessor itself or in an adjacent one) The reason is that otherwise the tests always fall out of date and become an albatross around our necks, plus (at least for me) the parameters of the testing environment are constantly changing. At some point we'll definitely need to generate csv files out of fairly arbitrary JObjects, and we should talk about how to do this in a clean way. I'd be tempted to not even bother writing a test harness to compare generated csv files, but simply put the files in the same repository so that any changes show up in the diff. (Of course, we'd have to sort them by event number, and there might always small differences due to numerical instabilities) |
For now THIS considered as an example of how to test plugins |
The latest jana-generate.py generates test case stubs inside the plugin skeleton, though I haven't documented this yet. |
Take a look at examples/UnitTestingExample on v2.0.7. |
Trying to break this down into actionable steps so we can close this issue someday:
|
Addressed 3 of the 6 actionables in PR #330. |
|
Lets imagine I have
beagle_reader
plugin which, as the name says, opens and reads "BeAGLE" events file.Now, having sample BeAGLE file with several events, I would like to write some tests for it. Probably it will not be a unit tests, but more like integration tests. How to do it?
I have several ideas, but all of them aren't pretty:
Soo... I'm out of ideas.
The text was updated successfully, but these errors were encountered: