DevOps and System Administration Discussions
Dive into SAP DevOps and system administration. Join discussions to collaborate on optimizing workflows, share knowledge, and leverage resources effectively.
cancel
Showing results for 
Search instead for 
Did you mean: 

exec-maven-plugin does not run on jenkins

0 Kudos

Could anyone help me with this, My jasmine javascript unit tests run successfully when i build my app in eclipse:

    [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ sig ---
    [INFO] Installing C:\Users\C5168279\git\smsigcom.sap.solman.graphical.component.sig\SMSIG\target\sig.war to C:\Users\C5168279\.m2\repository\com\sap\solman\graphical\component\sig\1.0.0\sig-1.0.0.war
    [INFO] Installing C:\Users\C5168279\git\smsigcom.sap.solman.graphical.component.sig\SMSIG\pom.xml to C:\Users\C5168279\.m2\repository\com\sap\solman\graphical\component\sig\1.0.0\sig-1.0.0.pom
    [INFO] 
    [INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ sig ---
    2014-02-20 17:35:35 Device API logging initialized - DEVICE
    2014-02-20 17:35:35 registerResourcePath ('', 'https://sapui5.hana.ondemand.com/resources/') -  sap.ui.ModuleSystem
    2014-02-20 17:35:35 URL prefixes set to: -  sap.ui.ModuleSystem
    2014-02-20 17:35:35   (default) : https://sapui5.hana.ondemand.com/resources/ -  sap.ui.ModuleSystem
    XMLHttpRequest cannot load https://sapui5.hana.ondemand.com/resources/sap/ui/controller/library-preload.json. Origin file:// is not allowed by Access-Control-Allow-Origin.
    2014-02-20 17:35:37 failed to preload 'sap.ui.controller.library-preload': Error: NETWORK_ERR: XMLHttpRequest Exception 101 -  sap.ui.ModuleSystem
    XMLHttpRequest cannot load https://sapui5.hana.ondemand.com/resources/sap/ui/controller/library.js. Origin file:// is not allowed by Access-Control-Allow-Origin.
    Error: failed to load 'sap/ui/controller/library.js' from https://sapui5.hana.ondemand.com/resources/sap/ui/controller/library.js: 0 - Error: NETWORK_ERR: XMLHttpRequest Exception 101

file:///C:/Users/C5168279/git/smsigcom.sap.solman.graphical.component.sig/SMSIG/src/test/js_unit/AppCoreController.Test.js:1
    Runner Started.
    MainController : should check if all parameters are empty , ags_sig_app.Views.Main : Graph.checkParameters() ... 
    Failed.
    MainController : should check that the GraphID exist for Display Mode, ags_sig_app.Views.Main : Graph.checkParameters() ... 
    Failed.
    MainController : should check that the Context Parameters exist for SMUD Graph Providers, ags_sig_app.Views.Main : Graph.checkParameters() ... 
    Failed.
    MainController : should check that the GraphMode exist, ags_sig_app.Views.Main : Graph.checkParameters() ... 
    Failed.
    MainController : should check that Display scenario is ok, ags_sig_app.Views.Main : Graph.checkParameters() ... 
    Failed.

BUT, when i deploy my application in Jenkins the test case are not detected by Jenkins the exec-maven-plugin does not run on jenkins.

[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ SMGC ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SMGC ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory d:\.jenkins\jobs\com.sap.solman.graphical.component.sig.git\workspace\gitRepo\SMSIG\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ SMGC ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SMGC ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.676s
[INFO] Finished at: Thu Feb 20 17:23:29 CET 2014
[INFO] Final Memory: 13M/491M
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS

This is the plugin my pom.xml:

<plugins>

                <!-- Run jasmine unit tests with phantomjs ************************* -->

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.2.1</version>
                    <executions>
                        <execution>
                            <id>PhantomJS Unit Testing</id>
                            <phase>test</phase>
                            <goals>
                                <goal>java</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>

                        <executable>${basedir}/src/test/phantomjs_framework/phantomjs.exe</executable>
                        <arguments>
                            <argument>run_jasmine.js</argument>
                            <argument>test_runner.html</argument>
                            <!-- <argument>${project.build.directory}/surefire-reports</argument> -->
                        </arguments>
                        <workingDirectory>${basedir}/src/test/phantomjs_framework</workingDirectory>
                    </configuration>

                </plugin>

Any ideas?

1 REPLY 1

DirkLehmann
Advisor
Advisor
0 Kudos

Not sure you'll get the right answers here. I think some maven forum or mailing list (https://maven.apache.org/mailing-lists.html) might be able to help on this