galenframework / galen

Layout and functional testing framework for websites
http://galenframework.com
1.41k stars 163 forks source link

Using galen with JUnit not working correctly #304

Closed hypery2k closed 9 years ago

hypery2k commented 9 years ago

Using version 2.0.5 with JUnit also executes TestNG Configurator:

...
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNG652Configurator
[TestNG] [ERROR] No test suite found. Nothing to run
Usage: <main class> [options]
 The XML suite files to run
  Options:
    -configfailurepolicy               Configuration failure policy (skip or
                                       continue)
    -d                                 Output directory
    -dataproviderthreadcount           Number of threads to use when running
                                       data providers
    -excludegroups                     Comma-separated list of group names to
                                       exclude
    -groups                            Comma-separated list of group names to be
                                       run
    -junit                             JUnit mode
                                       Default: false
    -listener                          List of .class files or list of class
                                       names implementing ITestListener or
                                       ISuiteListener
    -methods                           Comma separated of test methods
                                       Default: []
    -methodselectors                   List of .class files or list of class
                                       names implementing IMethodSelector
    -mixed                             Mixed mode - autodetect the type of
                                       current test and run it with appropriate
                                       runner
                                       Default: false
    -objectfactory                     List of .class files or list of class
                                       names implementing ITestRunnerFactory
    -parallel                          Parallel mode (methods, tests or classes)
    -port                              The port
    -reporter                          Extended configuration for custom report
                                       listener
    -suitename                         Default name of test suite, if not
                                       specified in suite definition file or
                                       source code
    -suitethreadpoolsize               Size of the thread pool to use to run
                                       suites
                                       Default: 1
    -testclass                         The list of test classes
    -testjar                           A jar file containing the tests
    -testname                          Default name of test, if not specified in
                                       suitedefinition file or source code
    -testnames                         The list of test names to run
    -testrunfactory, -testRunFactory   The factory used to create tests
    -threadcount                       Number of threads to use when running
                                       tests in parallel
    -usedefaultlisteners               Whether to use the default listeners
                                       Default: true
    -log, -verbose                     Level of verbosity
    -xmlpathinjar                      The full path to the xml file inside the
                                       jar file (only valid if -testjar was
                                       specified)
                                       Default: testng.xml

Configuring TestNG with: TestNG652Configurator
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/mreinhardt/.m2/repository/org/slf4j/slf4j-jdk14/1.6.1/slf4j-jdk14-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/mreinhardt/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/mreinhardt/.m2/repository/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Aug 06, 2015 6:32:08 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:08 PM com.galenframework.junit.JUnitStepListener testRunFinished
INFO: Generating Galen Html reports
Aug 06, 2015 6:32:11 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:13 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:14 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:15 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:16 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:17 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:18 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:18 PM com.galenframework.junit.JUnitStepListener testRunFinished
INFO: Generating Galen Html reports
Aug 06, 2015 6:32:22 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:25 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:27 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:30 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:33 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:36 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:40 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:32:43 PM com.galenframework.junit.JUnitStepListener testRunFinished
INFO: Generating Galen Html reports
Aug 06, 2015 6:32:48 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:33:07 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:33:26 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:33:46 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:34:08 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:34:29 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:34:56 PM sample.util.GalenBaseTest checkLayout
INFO: Running Galen check layout
Aug 06, 2015 6:35:27 PM com.galenframework.junit.JUnitStepListener testRunFinished
INFO: Generating Galen Html reports
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 206.257 sec - in TestSuite

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ galen-samples-junit ---
[INFO] Building jar: /Users/mreinhardt/Documents/Programmierung/repositories/git/private/galen_samples/junit/target/galen-samples-junit-0.1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:29 min
[INFO] Finished at: 2015-08-06T18:35:28+02:00
[INFO] Final Memory: 22M/278M
[INFO] ------------------------------------------------------------------------

And also the build is not failing... The TestNG variant is working, see my sample project here https://github.com/hypery2k/galen_samples

I will try to solve the issues with #302

hypery2k commented 9 years ago

fix is working with 2.0.7. I've updated my samples to this: https://github.com/hypery2k/galen_samples