Unit Testing with Processing

Hey, I'm doing some work for the college using Processing and was requested for me to do unit testing in some parts of the program. How can I do that in processing ? Is that possible or I have to implement it ?

kind regards,

Tagged:

Answers

  • This really depends on exactly what the teacher wants you to do. You might want to talk to them.

  • He wants we to come up with the tests. So we have to create the tests. We're working o image processing making filters so I have an idea of what tests to make. But Processing doesn't have any built-in mechanism for testing.

  • Processing is Java, so any Java testing frameworks should work for you, including JUnit.

  • in my experience, junit runs either as part of the build process or via netbeans' right click menu. how that'd fit into the processing compile cycle / ide i don't know.

    you could have a 'test' flag at the very top of the code. in setup if the flag is true then run unit tests, if false then run as normal.

    unit testing is good, if only because it makes you write code that is in small enough chunks to unit test.

Sign In or Register to comment.