1

I am currently writing a Java Decompiler in Python and would like to add some automated functional testing. I have a bunch of short pieces of Java code and need to ensure that they decompile without error, the output code compiles, and the resulting program gives the expected output.

I plan to write some scripts using subprocess to do this all automatically, but I'm having trouble deciding how to create and store the tests. I figured that before I go out and create my own format and test runner, I should try to see if there's any feasible way to use an existing framework. What should I do? I've read a lot on the internet about unit testing, integration testing, etc. but I am not sure how to apply it to my situation.

Antimony
  • 37,781
  • 10
  • 100
  • 107

1 Answers1

3

Have you check http://docs.python.org/library/unittest.html that is included in standard python API. I think this should be enough what you are trying to achive. You can run those tests through command line too. So they can be automated with any tool you want outside of python.

Also check doctests They are really great for testing single functions.

yilmazhuseyin
  • 6,442
  • 4
  • 34
  • 38