JUnit test method with parameters

Is it possible to pass parameters into JUnit method from outside of JUnit class??

7/15/2019 11:03:18 PM


1 Answer

New Answer


I started programmatically with junitCore.run(MyAwesomeClass.class); I need to pass in some objects constructed based on input from the command line. My program is an executable jar. A little context on why I'm doing this. I'm writing a command line program to drive tests based on inputs from a spreadsheet for my QA guy. I'm trying to test some code that has Android code mixed in, and I want to run it on the JVM. For that, I'm using Robolectric to fill in the stubs just so I can run, but the caveat is, you have to use their JUnit test runner.