mercredi 24 août 2016

jenkins detect failed non-junit test

Hy, On my maven project, I have standard Junit Test, and jasmine js test, who are executed by the plugin maven-grunt-plugin.

My issue is when the js jasmine fail, Jenkins don't act like it was a test failure, but like it was a compilation failure. The test generate some test report file

Any idea how to do jenkins to process the report file?

 <plugin>
                <groupId>pl.allegro</groupId>
                <artifactId>grunt-maven-plugin</artifactId>
                <version>1.5.0</version>
                <executions>
                    <execution>
                        <id>test-grunt</id>
                        <phase>test</phase>
                        <goals>
                            <goal>grunt</goal>
                        </goals>
                        <configuration>
                            <gruntOptions>
                                <gruntOption>tests</gruntOption>
                            </gruntOptions>
                            <disabled>${maven.test.skip}</disabled>
                        </configuration>

                    </execution>
                </executions>
            </plugin>

my gruntFile:

jasmine: {

            unit: {
                src:sourcesDest,
                options: {
                    specs: "main/spec/**/*Spec.js",

                    junit: {
                        path: 'jasmine-junit-reports/'
                    },
                },
            }

 grunt.registerTask("tests", ["jasmine:unit"]);

Aucun commentaire:

Enregistrer un commentaire