You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Larry Shatzer, Jr." <la...@gmail.com> on 2012/11/08 00:46:26 UTC

Surefire (with JUnit and TestNG) with the Release plugin and failures/errors in JUnit tests

I'm using a fairly recent feature of Surefire where you can specify
multiple providers (
http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html
)

I'm using both TestNG and Junit. Here is the secion of the pom in question:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.12.4</version>
    <dependencies>
      <dependency>
        <groupId>org.apache.maven.surefire</groupId>
        <artifactId>surefire-testng</artifactId>
        <version>2.12.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.surefire</groupId>
        <artifactId>surefire-junit4</artifactId>
        <version>2.12.4</version>
      </dependency>
    </dependencies>
  </plugin>

When I go to run release:prepare where I have a JUnit test either error or
fail, it will continue like everything is fine, and allow the release with
test failures or errors!

Here is the output from running release:prepare

http://pastebin.com/Z94egP3E

When I then have a TestNG failure, I get what I expect (a failure):

http://pastebin.com/yJufszdN

I'm not sure if this is a bug with the Release plugin, Surefire, or can be
helped with any extra configuration of either the Release plugin or
Surefire...

Thanks!

-- Larry

Re: Surefire (with JUnit and TestNG) with the Release plugin and failures/errors in JUnit tests

Posted by "Larry Shatzer, Jr." <la...@gmail.com>.
It was named ending in IT, but the only way I got it to run was to run all
of them with a mvn install. I wanted to just run one by hand.

-- Larry


On Thu, Nov 8, 2012 at 2:57 PM, Kristian Rosenvold <
kristian.rosenvold@zenior.no> wrote:

> Test name must probably end with IT
>
> Kristian
>
> Den 8. nov. 2012 kl. 22:51 skrev "Larry Shatzer, Jr." <la...@gmail.com>:
>
> > Created: http://jira.codehaus.org/browse/SUREFIRE-926
> >
> > As mentioned in the bug, I'm trying to create integration tests to
> exhibit
> > this behavior, but having a few problems. Also, is there an easy way to
> run
> > just one, or two integration tests by hand? I tried -Dit.test=MyNewTest
> but
> > it didn't run anything...
> >
> > Thanks
> >
> > -- Larry
> >
> > On Thu, Nov 8, 2012 at 12:11 AM, Kristian Rosenvold <
> > kristian.rosenvold@gmail.com> wrote:
> >
> >> This seems to be a bug; would you mind filing an issue
> >> http://jira.codehaus.org/browse/SUREFIRE ?
> >>
> >> Kristian
> >>
> >>
> >> 2012/11/8 Larry Shatzer, Jr. <la...@gmail.com>:
> >>> I'm using a fairly recent feature of Surefire where you can specify
> >>> multiple providers (
> >>
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html
> >>> )
> >>>
> >>> I'm using both TestNG and Junit. Here is the secion of the pom in
> >> question:
> >>>
> >>>  <plugin>
> >>>    <groupId>org.apache.maven.plugins</groupId>
> >>>    <artifactId>maven-surefire-plugin</artifactId>
> >>>    <version>2.12.4</version>
> >>>    <dependencies>
> >>>      <dependency>
> >>>        <groupId>org.apache.maven.surefire</groupId>
> >>>        <artifactId>surefire-testng</artifactId>
> >>>        <version>2.12.4</version>
> >>>      </dependency>
> >>>      <dependency>
> >>>        <groupId>org.apache.maven.surefire</groupId>
> >>>        <artifactId>surefire-junit4</artifactId>
> >>>        <version>2.12.4</version>
> >>>      </dependency>
> >>>    </dependencies>
> >>>  </plugin>
> >>>
> >>> When I go to run release:prepare where I have a JUnit test either error
> >> or
> >>> fail, it will continue like everything is fine, and allow the release
> >> with
> >>> test failures or errors!
> >>>
> >>> Here is the output from running release:prepare
> >>>
> >>> http://pastebin.com/Z94egP3E
> >>>
> >>> When I then have a TestNG failure, I get what I expect (a failure):
> >>>
> >>> http://pastebin.com/yJufszdN
> >>>
> >>> I'm not sure if this is a bug with the Release plugin, Surefire, or can
> >> be
> >>> helped with any extra configuration of either the Release plugin or
> >>> Surefire...
> >>>
> >>> Thanks!
> >>>
> >>> -- Larry
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Surefire (with JUnit and TestNG) with the Release plugin and failures/errors in JUnit tests

Posted by Kristian Rosenvold <kr...@zenior.no>.
Test name must probably end with IT

Kristian

Den 8. nov. 2012 kl. 22:51 skrev "Larry Shatzer, Jr." <la...@gmail.com>:

> Created: http://jira.codehaus.org/browse/SUREFIRE-926
>
> As mentioned in the bug, I'm trying to create integration tests to exhibit
> this behavior, but having a few problems. Also, is there an easy way to run
> just one, or two integration tests by hand? I tried -Dit.test=MyNewTest but
> it didn't run anything...
>
> Thanks
>
> -- Larry
>
> On Thu, Nov 8, 2012 at 12:11 AM, Kristian Rosenvold <
> kristian.rosenvold@gmail.com> wrote:
>
>> This seems to be a bug; would you mind filing an issue
>> http://jira.codehaus.org/browse/SUREFIRE ?
>>
>> Kristian
>>
>>
>> 2012/11/8 Larry Shatzer, Jr. <la...@gmail.com>:
>>> I'm using a fairly recent feature of Surefire where you can specify
>>> multiple providers (
>> http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html
>>> )
>>>
>>> I'm using both TestNG and Junit. Here is the secion of the pom in
>> question:
>>>
>>>  <plugin>
>>>    <groupId>org.apache.maven.plugins</groupId>
>>>    <artifactId>maven-surefire-plugin</artifactId>
>>>    <version>2.12.4</version>
>>>    <dependencies>
>>>      <dependency>
>>>        <groupId>org.apache.maven.surefire</groupId>
>>>        <artifactId>surefire-testng</artifactId>
>>>        <version>2.12.4</version>
>>>      </dependency>
>>>      <dependency>
>>>        <groupId>org.apache.maven.surefire</groupId>
>>>        <artifactId>surefire-junit4</artifactId>
>>>        <version>2.12.4</version>
>>>      </dependency>
>>>    </dependencies>
>>>  </plugin>
>>>
>>> When I go to run release:prepare where I have a JUnit test either error
>> or
>>> fail, it will continue like everything is fine, and allow the release
>> with
>>> test failures or errors!
>>>
>>> Here is the output from running release:prepare
>>>
>>> http://pastebin.com/Z94egP3E
>>>
>>> When I then have a TestNG failure, I get what I expect (a failure):
>>>
>>> http://pastebin.com/yJufszdN
>>>
>>> I'm not sure if this is a bug with the Release plugin, Surefire, or can
>> be
>>> helped with any extra configuration of either the Release plugin or
>>> Surefire...
>>>
>>> Thanks!
>>>
>>> -- Larry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Surefire (with JUnit and TestNG) with the Release plugin and failures/errors in JUnit tests

Posted by "Larry Shatzer, Jr." <la...@gmail.com>.
Created: http://jira.codehaus.org/browse/SUREFIRE-926

As mentioned in the bug, I'm trying to create integration tests to exhibit
this behavior, but having a few problems. Also, is there an easy way to run
just one, or two integration tests by hand? I tried -Dit.test=MyNewTest but
it didn't run anything...

Thanks

-- Larry

On Thu, Nov 8, 2012 at 12:11 AM, Kristian Rosenvold <
kristian.rosenvold@gmail.com> wrote:

> This seems to be a bug; would you mind filing an issue
> http://jira.codehaus.org/browse/SUREFIRE ?
>
> Kristian
>
>
> 2012/11/8 Larry Shatzer, Jr. <la...@gmail.com>:
> > I'm using a fairly recent feature of Surefire where you can specify
> > multiple providers (
> >
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html
> > )
> >
> > I'm using both TestNG and Junit. Here is the secion of the pom in
> question:
> >
> >   <plugin>
> >     <groupId>org.apache.maven.plugins</groupId>
> >     <artifactId>maven-surefire-plugin</artifactId>
> >     <version>2.12.4</version>
> >     <dependencies>
> >       <dependency>
> >         <groupId>org.apache.maven.surefire</groupId>
> >         <artifactId>surefire-testng</artifactId>
> >         <version>2.12.4</version>
> >       </dependency>
> >       <dependency>
> >         <groupId>org.apache.maven.surefire</groupId>
> >         <artifactId>surefire-junit4</artifactId>
> >         <version>2.12.4</version>
> >       </dependency>
> >     </dependencies>
> >   </plugin>
> >
> > When I go to run release:prepare where I have a JUnit test either error
> or
> > fail, it will continue like everything is fine, and allow the release
> with
> > test failures or errors!
> >
> > Here is the output from running release:prepare
> >
> > http://pastebin.com/Z94egP3E
> >
> > When I then have a TestNG failure, I get what I expect (a failure):
> >
> > http://pastebin.com/yJufszdN
> >
> > I'm not sure if this is a bug with the Release plugin, Surefire, or can
> be
> > helped with any extra configuration of either the Release plugin or
> > Surefire...
> >
> > Thanks!
> >
> > -- Larry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Surefire (with JUnit and TestNG) with the Release plugin and failures/errors in JUnit tests

Posted by Kristian Rosenvold <kr...@gmail.com>.
This seems to be a bug; would you mind filing an issue
http://jira.codehaus.org/browse/SUREFIRE ?

Kristian


2012/11/8 Larry Shatzer, Jr. <la...@gmail.com>:
> I'm using a fairly recent feature of Surefire where you can specify
> multiple providers (
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/providers.html
> )
>
> I'm using both TestNG and Junit. Here is the secion of the pom in question:
>
>   <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-surefire-plugin</artifactId>
>     <version>2.12.4</version>
>     <dependencies>
>       <dependency>
>         <groupId>org.apache.maven.surefire</groupId>
>         <artifactId>surefire-testng</artifactId>
>         <version>2.12.4</version>
>       </dependency>
>       <dependency>
>         <groupId>org.apache.maven.surefire</groupId>
>         <artifactId>surefire-junit4</artifactId>
>         <version>2.12.4</version>
>       </dependency>
>     </dependencies>
>   </plugin>
>
> When I go to run release:prepare where I have a JUnit test either error or
> fail, it will continue like everything is fine, and allow the release with
> test failures or errors!
>
> Here is the output from running release:prepare
>
> http://pastebin.com/Z94egP3E
>
> When I then have a TestNG failure, I get what I expect (a failure):
>
> http://pastebin.com/yJufszdN
>
> I'm not sure if this is a bug with the Release plugin, Surefire, or can be
> helped with any extra configuration of either the Release plugin or
> Surefire...
>
> Thanks!
>
> -- Larry

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org