How to jenkins interact with tests carried out with Karma via ssh

38 views
Skip to first unread message

Erick Macedo

unread,
May 28, 2015, 5:21:31 PM5/28/15
to jenkin...@googlegroups.com
hi,

After much difficulty I can carry out the project for a transfer windowns server via ssh and run the grunt test.

Now my problem is the implementation of these test, the grunt performs functional tests with karma and stores it in an xml, the jenkins displays the result on the console.

But even if the test failed it builds successfully build.

How can I make jenkins interact with these tests to break the build on failure?

thank 

Suckow, Thomas J

unread,
May 28, 2015, 6:45:47 PM5/28/15
to jenkin...@googlegroups.com
You need a plugin like xUnit. Then you need to configure karma to output in a format it understands. I have traditionally saved all test output in junit format

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/6938fcf1-9a1c-42d8-a2b6-a9b9a52870bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Suckow, Thomas J

unread,
May 28, 2015, 6:48:15 PM5/28/15
to jenkin...@googlegroups.com
Also, don't cross post. This should have only been asked on the jenkins-users list.

From: Erick Macedo <erickf...@gmail.com>
Reply-To: "jenkin...@googlegroups.com" <jenkin...@googlegroups.com>
Date: Thursday, May 28, 2015 at 2:21 PM
To: "jenkin...@googlegroups.com" <jenkin...@googlegroups.com>
Subject: How to jenkins interact with tests carried out with Karma via ssh

--

Erick Macedo

unread,
May 29, 2015, 7:26:37 AM5/29/15
to jenkin...@googlegroups.com
Suckow, first to thank you for your help.

Ok, I will not repeat more, good to know.

I am running my test via ssh with the plugin "Publish over SSH" and Exec command field:

cd / cygdrive / c / jenkins / project-sale-mobile / deliver-main / build / sell-mobile / node_modules / grunt-cli / bin;
./grunt
--base C: / jenkins / project-sale-mobile / deliver-main / build / sell-Mobile
--gruntfile C: / jenkins / project-sale-mobile / deliver-main / build / sell-mobile / GruntFile.js test

  They are already being generated in the junit format, this plugin "xUnit" is able to interpret this xml on the remote server via ssh and break the build on the test fails?

thank 
Reply all
Reply to author
Forward
0 new messages