ghostinspector(phantomjs) running from jenkins and seeing result in jenkins - jenkins

I am using ghostinspector to record and run tests. I have also seen API integration.
Is there a way I can create a build and when I trigger this build, it runs test on ghostinspector. (I am able to do this using custom build command in jenkins which makes curl request)
In additional to triggering build I would like to see result in jenkins as well. does ghostinspector or phantomjs test script returns result in TAP format or any other format which jenkins can show as test results

Full disclosure: I work for Ghost Inspector.
We now offer the ability to download results from your test suite in XUnit format via our API that you should be able to use in Jenkins to report on your suite status.
Hope that helps.

Related

How to display local test report in Jenkins?

My Test suite will generate a XML report and save it in my local machine. Is it possible to read XML report from my local machine and display it in as Jenkins logs.
Your flow seems backwards.
You should run your tests locally BEFORE Jenkins gets involved. Once it looks good locally, use some trigger like a git branch push to have Jenkins also run those tests and create the XML results file on the Jenkins server.
Within the job's configuration you can use a Jenkins plugin for the specific test framework you are using and it will automatically make your test results available within the job's output.
Search for the specific plugin and installation instructions here https://wiki.jenkins.io/display/JENKINS/Plugins

Run test cases in jenkins using java program

I have developed a webpage.In that i have a button. I want to run test cases in jenkins after clicking the button.How do i run testng testcases in Jenkins programatically ?
You will have to configure your job to trigger on that button click and write script to be executed in job config for running test cases.
OR
You can integrate your Jenkins with SCM tool.(eg GitHub)
Push your source codes files their, configure your repo with Jenkins.
You can have .xml file with target to run test cases, and u can mention that target in commands section it will run test cases OR instead of .xml file you can write entire script needed to run test cases.
(Additionally you can use github hook feature to trigger this job after new code changes have been done, so it can be tested instantly).
I hope this will give you an idea, feel free to contact if you have any queries.

Gatling Integration with JENKINS without using MAVEN

Developed few scripts using GATLING tool
Able to execute those scripts as a standalone basis
Execution done through GATLING provided .bat file
Triggering of the batch file will ask for user inputs during run time to
select which scenario to simulate
Trying to integrate these scripts and trigger via JENKINS -
As parameterizing the argument does not support the GATLING provided bat
file
Configuring the GATLING provided bat file results in failure of build -
as it requires a user input during run time
Please anyone can provide a step wise approach to integrate GATLING scripts in JENKINS
Gatling support passing parameter : http://gatling.io/docs/current/cookbook/passing_parameters/
Gatling seems a Java tool and execute script by a .bat/.sh file, so that you can inspect what command and parameters it used in backgounnd sence with some tool's help. like 'processhacker' is a enhancement of Windows Task Management. with it you can see the whole command to help you find out how to pass scenario you want to run in command line. If 'processhacker' can't help that, you need to read the souce code of Gatling or send support mail to its company to ask help.

Running Protractors in Jenkins

I was just wondering if it is possible to run protractor e2e tests in Jenkins with every build. Currently we trigger test cases manually and they are not part of Jenkins but somehow I need them to be run automatically and show the results (failures/pass) as part of the build.
Can anyone share their experience.
Regards
Syed Zaidy
Yes this is possible, you set this up under the Build Triggers section of your job. You have the options to build periodically, build remotely, build after another project is built, or build after a push to GitHub/BitBucket.
You can also put your tests in the pipeline, "downstream" from another job, so they are automatically triggered whenever that job completes.
Yes, it is possible to run Protractor tests from a Jenkins job. To do this, you will need a headless browser. Read about Headless browsers here:
You can follow the following instructions and install npm, protractor and chrome headless in the Jenkins box here

When selenium test runs by Jenkins and nUnit, the browser doesn't come up however there are valid results

I would say that my problem rather lack of information and I need some confirmation than a real problem. It seems somebody else had similar question question.
I put together a machine (Windows Server 2012R2) for POC reasons where a Jenkins installed and it executes Selenium UI tests using nunit. The nunit tests are generated by Specflow.
I could do:
install jenkins
jenkins run by a valid user not by Service account
set up jenkins properly
it can pull the source code from TFS-GIT
it can compile the C# solution
it can execute the test project
the test results are correct
Selenium plugin installed on Jenkins but I don't think it is used in this case because the text execution is about executing nunit and it deals with everything else.
At the moment I don't need the capability to delegate test execution to other Jenkins slaves or machines because the Jenkins does have only one compile task. Compiling, executing and test running can go parallel, the machine able to deal with it.
But, when I log in the server where the Jenkins runs and I watch what happens during CI build (compile and test execution) I can't see that the browser (Firefox) starts, however, the test results and the logs show that a browser was executed.
What I did so far:
jenkins runs as service, the account is an existing account
If I remote to the machine with the account which is set up for the service, then I can't see the browser will be executed, however, the log shows that something had happened.
My question is that, what the hack is happening when my tests are executed by Jenkins? If I execute the command which is used by Jenkins from console on the same machine then I can see that Firefox starts, does what is programmed in the tests and the results are in the result.xml. Can I accept the result as valid result? Can I somehow set up Jenkins the way the browser really executed (I can believe it when I see it :) )?
I think this is because you run Jenkins as a service. Services do not show up in desktop. Workaround is to run Jenkins or slave from CMD.
Jenkins windows slave service does not interact with desktop

Resources