Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      4

      Description

      I've written a first pass at a surefire-provider for JUnit and Python unittest TestCases written in Jython. Before I continue any further I'd like to make sure that the provider is wanted and that I'm heading in the right direction.

      To do the minimum to get it up and running, I've hooked into the maven-surefire-plugin to hook my provider into the system somewhat like the TestNG provider did. maven-surefire-plugin passes a path(defaults to src/test/jython) to the provider. The provider searches the path for files matching include patterns and loads those as Python modules. For every class in the matching modules that extends junit or unittest TestCase, it makes a SurefireTestSuite and exposes them for running. Sound like a decent approach?

      To give it a spin, apply maven-surefire-plugin.patch, mvn install on the surefire-jython project and run mvn test in jythonProviderTest. It's just contains a single Junit testcase with a failing and passing test.

      I haven't even checked what happens when the jython tests throw exceptions, and I know there's alot to be done as far as making it a usable plugin, but I felt like getting some feedback before continuing.

      1. jythonProvider.tar.gz
        7 kB
        Charlie Groves
      2. jythonProviderTest.tar.gz
        0.7 kB
        Charlie Groves
      3. MSUREFIRE-122-maven-surefire-plugin.patch
        5 kB
        Charlie Groves
      4. MSUREFIRE-122-surefire-providers.patch
        26 kB
        Charlie Groves

        Activity

        Hide
        Karl Palsson added a comment -

        To me this sounds perfect, either via this patch, or via http://jira.codehaus.org/browse/SUREFIRE-141 We've started writing tests in jython, but currently it's an entirely separate project, that we copy the built jar over into, I'd love to see it better integrated!

        Show
        Karl Palsson added a comment - To me this sounds perfect, either via this patch, or via http://jira.codehaus.org/browse/SUREFIRE-141 We've started writing tests in jython, but currently it's an entirely separate project, that we copy the built jar over into, I'd love to see it better integrated!
        Hide
        Kristian Rosenvold added a comment -

        Note that surefire-141 has now been fixed.

        Show
        Kristian Rosenvold added a comment - Note that surefire-141 has now been fixed.
        Hide
        Kristian Rosenvold added a comment -

        I am proposing this issue as wontfix. Now that surefire-141 is fixed, it is trivial to write a jython provider that seamlessly integrates with surefire. This provider should be part of the jython community and I really see no reason why it should be included in surefire itself.

        Show
        Kristian Rosenvold added a comment - I am proposing this issue as wontfix. Now that surefire-141 is fixed, it is trivial to write a jython provider that seamlessly integrates with surefire. This provider should be part of the jython community and I really see no reason why it should be included in surefire itself.
        Show
        Kristian Rosenvold added a comment - http://mail-archives.apache.org/mod_mbox/maven-dev/201101.mbox/%3C1295866251.13332.27.camel@chunky%3E
        Hide
        Johannes Buchner added a comment -

        Take a look at my jython test plugin at http://mavenjython.sourceforge.net/test/

        Show
        Johannes Buchner added a comment - Take a look at my jython test plugin at http://mavenjython.sourceforge.net/test/

          People

          • Assignee:
            Unassigned
            Reporter:
            Charlie Groves
          • Votes:
            9 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: