Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] tycho-surefire and testng

"small complete standalone example" == a zip or tgz file that includes
pom.xml and all sources necessary to demonstrate the problem. I want to
be able to unpack the archive, run "mvn test" (or some other build phase
you specify) and see the problem for myself. I am not good at guessing
what other configuration elements you pom files have and what happens
when maven interprets those poms.

--
Regards,
Igor

On 1/23/2014, 14:09, Tracy, Benjamin J wrote:
Oops I forgot to mention that what I see when I run with this is that the maven surefire never runs.
________________________________________
From: Tracy, Benjamin J
Sent: Thursday, January 23, 2014 2:08 PM
To: Tycho user list
Subject: RE: [tycho-user] tycho-surefire and testng

OK here's a smaller example:

I believe that the following snippet should cause the maven-surefire plugin to run at the test phase and the tycho surefire plugin to run later.  Am I right about that?

         <pluginManagement>
                 <plugins>
                         <plugin>
                                 <artifactId>maven-surefire-plugin</artifactId>
                                 <version>2.16</version>
                                 <executions>
                                         <execution>
                                                 <phase>test</phase>
                                                 <goals>
                                                         <goal>test</goal>
                                                 </goals>
                                         </execution>
                                 </executions>
                                 <dependencies>
                                         <dependency>
                                                 <groupId>org.apache.maven.surefire</groupId>
                                                 <artifactId>surefire-testng</artifactId>
                                                 <version>2.16</version>
                                                 <scope>test</scope>
                                         </dependency>
                                 </dependencies>
                                 <configuration>
                                         <testSourceDirectory>src/</testSourceDirectory>
                                         <testClassesDirectory>target/classes/</testClassesDirectory>
                                 </configuration>
                         </plugin>
                         <plugin>
                                 <groupId>org.eclipse.tycho</groupId>
                                 <artifactId>tycho-surefire-plugin</artifactId>
                                 <version>${tycho-version}</version>
                                 <configuration>
                                         <providerHint>junit47</providerHint>
                                         <useSystemClassLoader>false</useSystemClassLoader>
                                         <dependencies>
                                                 <dependency>
                                                         <type>eclipse-plugin</type>
                                                         <artifactId>apm-common.bundle</artifactId>
                                                         <version>0.0.0</version>
                                                 </dependency>
                                         </dependencies>

                                 </configuration>
                                 <executions>
                                         <execution>
                                                 <id>JUnitTest</id>
                                                 <goals>
                                                         <goal>test</goal>
                                                 </goals>
                                                 <phase>install</phase>
                                         </execution>
                                 </executions>
                         </plugin>
                 </plugins>
         </pluginManagement>

________________________________________
From: tycho-user-bounces@xxxxxxxxxxx [tycho-user-bounces@xxxxxxxxxxx] on behalf of Igor Fedorenko [igor@xxxxxxxxxxxxxx]
Sent: Thursday, January 23, 2014 11:28 AM
To: Tycho user list
Subject: Re: [tycho-user] tycho-surefire and testng

Please provide small complete standalone example I can "mvn test" and
see the exact failure you get? Also explain what you believe should
happen to make the error go away.

--
Regards,
Igor

On 1/23/2014, 10:12, Tracy, Benjamin J wrote:
Thanks for taking the time.  I've attached a few pom files:  the parent, the test fragment and the target platform pom.   It's not a tiny example, but it's still pretty general.

Thanks in advance!
Ben


________________________________________
From: tycho-user-bounces@xxxxxxxxxxx [tycho-user-bounces@xxxxxxxxxxx] on behalf of Igor Fedorenko [igor@xxxxxxxxxxxxxx]
Sent: Thursday, January 23, 2014 9:57 AM
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] tycho-surefire and testng

Tycho is supposed to map OSGi dependencies back to pom.xml model, so at
least theoretically is should be possible to use "plain"
maven-surefire-plugin for Tycho projects. Whether this will work in
practice depends on your project structure and dependencies your project
uses. If you can provide a small standalone example that shows your
setup I may be able to provide more specific recommendation.

--
Regards,
Igor

On 1/23/2014, 9:48, Tracy, Benjamin J wrote:
Are you sure you get up to the correct lifecycle phase? Running mvn test
will not do, as the tycho surefire plugin hooks into the
integration-test phase by default:
http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html

Thanks for your quick response!

I noticed that the tycho-surefire runs at integration test.  I had given
up on that plugin because there was no provider hint for TestNG (which
led me to believe what I had read that TestNG was not supported) and
when I give the JUnit 4.7 provider hint, I get an exception
(ClassNotFound on OsgiEnabledJUintCoreProvider).  So I had added
"<skip>true</skip>" to the tycho-surefire so that I could try to get
TestNG working the regular way and that isn't working for me either.

What am I supposed to do to get TestNG to work?

Ben


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top