-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a testng configuration for unit and integration tests #1
Comments
Salut, Nice to learn that someone out there finds this useful. What is your usage scenario exactly? As for the reported issue: Can you please provide a reproducible setup for me (testng.xml, annotated code)? Resource resolution and registry (model files) is a weak spot in the Eclipse-verse, always. I am happy to help out, but I need a point to start. Stefan (aka mrcalvin) from Vienna |
Hello Stefan, I have fork your repository to push the preliminary configuration for if you run mvn clean install, it will execute during test phase a simple After the clean install process, you could also test manually your jar with My goal/scenario is to be able to test the application because for Thanks for your advice. Francois flefevre@localhost target]$ java -jar qvto-app-0.1-SNAPSHOT.jar -xform <mmsource:root xmi:version="20131001" xmlns:xmi=" On Thu, Jan 14, 2016 at 6:50 AM, mrcalvin [email protected] wrote:
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
Hello Stefan Thanks for your feedback Francois On Thu, Jan 14, 2016 at 8:50 PM, Francois Le Fevre [email protected]
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
Hi Francois,
Stefan |
Hi Francois, |
Stefan Francois On Thu, Jan 28, 2016 at 9:19 AM, mrcalvin [email protected] wrote:
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
But time is up for the moment, |
I should add that I need to find a way to store or link the Eclipse Stefan
|
For the time being, can you run the testng tests from within eclipse, using the testng-eclipse plugin? For one, this might get you going. Besides, this would help triangulate my suspicion. Stefan |
Hello so I have installed the eclipse testng plugin in eclipse. From the class[TestNG] Running: Fast test Fom the tesng suiteFast test Type of transformation parameter should be model type (at:4)I have pushed the files under the fork on github. As we can see the qvt message is simple: it is no able to solve the Perhaps we could ask on the forum qvt linking to the github fork repository? Francois On Fri, Jan 29, 2016 at 2:34 AM, mrcalvin [email protected] wrote:
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
Salut, Check out the testng-example branch, this should get you going for the moment. Beware that this is not a permanent or ideal solution, but it allows you to develop your test suite; till I figure out a more sustainable approach (I have sth. in mind). Hope it helps, |
Hello I think you could merge it. What is your new approach? Have a good start in your week. Francois On Fri, Feb 12, 2016 at 5:36 PM, mrcalvin [email protected] wrote:
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
Hi,
This is fixed now. Pls. verify.
Stefan |
Stefan, sure no problem to respect the convention of maven and of your projet. I have a question due to my miss understanding of github. I have tried to make the change you asked. Is the status ok for you to a merge or did I make something wrong? Thanks for your explanation. Francois On Mon, Feb 15, 2016 at 8:26 PM, mrcalvin [email protected] wrote:
Francois Le Fevre Paris, FranceAvant d'imprimer, pensez à l'environnement |
flefevre's additions are preserved in the |
Dear Calvin,
great job here !
thanks a lot for this usefull example.
I am trying to add a testng test configuration for unit and integration tests to be sure that the project do not diverge.
I am facing the problem for unit test
<<
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ qvto-app ---
T E S T S
Running TestSuite
Fast test
Failed to execute file:/home/flefevre/gits/qvt-cloud-factory/qvto-app/src/test/resources/qvto4abcmodel/transforms/transformationABC.qvto: Compilation errors found in unit 'file:/home/flefevre/gits/qvt-cloud-factory/qvto-app/src/test/resources/qvto4abcmodel/transforms/transformationABC.qvto'
Failed to resolve metamodel 'http://www.mmsource.fr' (at:1)
Type of transformation parameter should be model type (at:4)
Type of transformation parameter should be model type (at:4)
<<<
and exactly the same for the integration tests
<<
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ qvto-app ---
[INFO] Building jar: /home/flefevre/gits/qvt-cloud-factory/qvto-app/target/qvto-app-0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-shade-plugin:2.3:shade (default) @ qvto-app ---
[WARNING] Map in class org.apache.maven.plugins.shade.resource.ManifestResourceTransformer declares value type as: class java.util.jar.Attributes but saw: class java.lang.String at runtime
[INFO] Including at.ac.wu.nm:qvt-bundle:jar:repackaged:4.4 in the shaded jar.
[INFO] Including com.beust:jcommander:jar:1.47 in the shaded jar.
[INFO] Including org.slf4j:slf4j-api:jar:1.6.1 in the shaded jar.
[INFO] Including ch.qos.logback:logback-classic:jar:1.0.13 in the shaded jar.
[INFO] Including ch.qos.logback:logback-core:jar:1.0.13 in the shaded jar.
[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing /home/flefevre/gits/qvt-cloud-factory/qvto-app/target/qvto-app-0.1-SNAPSHOT.jar with /home/flefevre/gits/qvt-cloud-factory/qvto-app/target/qvto-app-0.1-SNAPSHOT-shaded.jar
[INFO] Dependency-reduced POM written at: /home/flefevre/gits/qvt-cloud-factory/qvto-app/dependency-reduced-pom.xml
[INFO] Dependency-reduced POM written at: /home/flefevre/gits/qvt-cloud-factory/qvto-app/dependency-reduced-pom.xml
[INFO]
[INFO] --- maven-failsafe-plugin:2.19.1:integration-test (default) @ qvto-app ---
T E S T S
Running TestSuite
Fast test
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/flefevre/gits/qvt-cloud-factory/qvto-app/target/qvto-app-0.1-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/flefevre/.m2/repository/ch/qos/logback/logback-classic/1.0.13/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Failed to execute file:/home/flefevre/gits/qvt-cloud-factory/qvto-app/src/test/resources/qvto4abcmodel/transforms/transformationABC.qvto: Compilation errors found in unit 'file:/home/flefevre/gits/qvt-cloud-factory/qvto-app/src/test/resources/qvto4abcmodel/transforms/transformationABC.qvto'
Failed to resolve metamodel 'http://www.mmsource.fr' (at:1)
Type of transformation parameter should be model type (at:4)
Type of transformation parameter should be model type (at:4)
<<
I have added in the qvto pom the following elements
org.testng testng 6.9.8 testand
org.apache.maven.plugins maven-surefire-plugin 2.19.1 src/test/resources/unitTests/testng.xml org.apache.maven.plugins maven-failsafe-plugin 2.19.1 src/test/resources/integrationTests/testng.xml target/qvto-app-0.1-SNAPSHOT.jar integration-test verifyIf I execute the jar file alone it is working... by no way to test it in maven...
java -jar qvto-app-0.1-SNAPSHOT.jar -xform ../src/test/resources/qvto4abcmodel/transforms/transformationABC.qvto -src ../src/test/resources/qvto4abcmodel/modelSource/MMSource.ecore ../src/test/resources/qvto4abcmodel/modelSource/MSource.xmi -tgt ../src/test/resources/qvto4abcmodel/modelSource/MMSource.ecore ../src/test/resources/qvto4abcmodel/modelTarget/my.xmi
Do you have any idea why?
Francois, from Europa
The text was updated successfully, but these errors were encountered: