A nose plugin to run JUnit tests via Jython.

October 12th, 2008 § 9 comments

Float­ing an idea to all of you in python­land — I’ve been sketch­ing out a nose plu­gin that would be able to find and exe­cute JUnit tests in your for your java code base.

The report­ing of the result would be uni­fied — using nose-xunit for non-junit tests, you should get back one happy-shiny report for all of your tests.

Any­one have any thoughts out there?

  • http://dazedbystander.blogspot.com/ Ben

    What would this entail in terms of run­ning nose tests which depend on CPython libraries? Would it require run­ning one set of tests with CPython and another set of tests with Jython? If so, I’m not sure how much of an advan­tage this would be over using other pre-existing JUnit test execu­tors (if such execu­tors are avail­able or already being used in an organization).

  • http://aleaxit.blogspot.com/ aleax

    Just ONE thought: a “nose plu­gin” sounds like a real ECCH…!-)

    Alex

  • http://farmdev.com/ kumar303

    Not sure if you are inter­ested in gain­ing “user share” from the Java com­mu­nity but I have a feel­ing you’d be hard pressed to pull Java users away from Test-NG unless they were already work­ing mostly in Python. TestNG offers a lot of fea­tures that Nose doesn’t have. The nice ones that come to mind: re-running just fail­ing tests, fancy group­ing that goes a lit­tle beyond nose’s attr plu­gin, and bet­ter tests-in-parallel sup­port. In fact, I’d love to see some of these fea­tures in Nose.

  • jnoller

    No — I don’t expect (or want) to take mind­share away from JUnit run­ners peo­ple know — how­ever in a mixed lan­guage envi­ron­ment, it may make sense to have “one run­ner to bind them” so to speak. In my case, I am look­ing at using nose to run all tests that are above unit-level, this means func­tional, accep­tance, etc — I don’t want to have to deal with mul­ti­ple run­ners and silos of results, ergo mak­ing a plu­gin for nose that can smell-out, and run Junit tests.

    Under the hood, nose (as it is in cpython) would oper­ate nor­mally but be able to find tests in the java code. Jython would be used to actu­ally fire up the JVM and use JUnit to run the java tests it found.

    So, I’m not sug­gest­ing rein­vent­ing the wheel, just mak­ing it so I can run tests I “wouldn’t nor­mally have a view into”

  • jnoller

    See my reply to Ben above — I don’t want to take mind­share from Java, I don’t want to play in those rein­deer games, I just want the abil­ity to run tests in my java code base that are above unit-test level (func­tional, sys­tem level) that don’t make sense to run with the units.

    I’ll peek at the fea­tures your talk­ing about for nose, I love the attr-style group­ing of nose (of course, I’m biased, I loves me tagging).

  • jnoller

    I really want to write a plugin/wrapper called nose-job, that would lis­ten for remote execution/job requests.

  • http://jessenoller.com jnoller

    No — I don’t expect (or want) to take mind­share away from JUnit run­ners peo­ple know — how­ever in a mixed lan­guage envi­ron­ment, it may make sense to have “one run­ner to bind them” so to speak. In my case, I am look­ing at using nose to run all tests that are above unit-level, this means func­tional, accep­tance, etc — I don’t want to have to deal with mul­ti­ple run­ners and silos of results, ergo mak­ing a plu­gin for nose that can smell-out, and run Junit tests.

    Under the hood, nose (as it is in cpython) would oper­ate nor­mally but be able to find tests in the java code. Jython would be used to actu­ally fire up the JVM and use JUnit to run the java tests it found.

    So, I’m not sug­gest­ing rein­vent­ing the wheel, just mak­ing it so I can run tests I “wouldn’t nor­mally have a view into”

  • http://jessenoller.com jnoller

    See my reply to Ben above — I don’t want to take mind­share from Java, I don’t want to play in those rein­deer games, I just want the abil­ity to run tests in my java code base that are above unit-test level (func­tional, sys­tem level) that don’t make sense to run with the units.

    I’ll peek at the fea­tures your talk­ing about for nose, I love the attr-style group­ing of nose (of course, I’m biased, I loves me tagging).

  • http://jessenoller.com jnoller

    I really want to write a plugin/wrapper called nose-job, that would lis­ten for remote execution/job requests.

What's this?

You are currently reading A nose plugin to run JUnit tests via Jython. at jessenoller.com.

meta