publish reports--jenkins ci - html

I have generated the test results in xml/html format using batch script.
Now I want to publish those reports on jenkins dash board.
Can anyone please help and tell me, how to publish reports on dashboard by providing external reports like (xml/html)?
Please let me know if any plugin exists for that.
Thanks in advance,
raj.

You should use maven or ant build tool, not batch.
For maven job type, it will be done automatically.

Related

How to generate HTML test report for python script

I am working in python + Appium to automate an Android App. I have created 7 scripts and imported all the scripts in a single script named Main_module_testing.py.
Now I want to generate an HTML Report for my test. In which it automatically creates Pass/Fail result. I have tried HTMLTestRunner.py, but its throwing so many error related to IOString, Unicode, decode etc.
Can anyone please tell how to fix it or generate an automatic HTML test report?
You can integrate Python selenium test with HTMLTestRunner to generate report in html follow below link:
HTMLTestRunner
Click Here
Let me know if you see any issue.

Creating an HTML report with embedded screenshots of failed JUnit tests

I've put together a custom JUnit runner that saves a screenshot when a WebDriver test fails.
I'm using Maven's failsafe plugin to create reports of the integration tests and TeamCity is our CI server.
I know TeamCity supports custom reports, but I don't know how I'd embed the image files into an HTML page (or pages) with references to the relevant tests.
What would be a good method to integrate the screenshots into the test report?
Is there a Maven plugin that'll do the job?
Maybe Allure-report would suit for your purpose. It allows to create a nice report that contains different attachments, including screenshots. Moreover it has JUnit integration and Teamcity plugin, so it fully covers your use-case.
Unfortunately there is no way to simply change the reports cause they are generated by the maven-report-plugin which can't be simply changed.
What you can try is to create a separate folder and create a link via the site.xml descriptor.
You can try maven-cobertura-plugin. Including this in your build will generate a HTML report of all the test case success, failure and coverage. Hope this helps....

Checkstyle report not displayed in Hudson dashboard

I meet same trouble. The checkstyle_report.xml is OK.
But the report can not display hudson dashboard.
How to fix this?
Thanks in advance!
Try to start another build. You have to selected to publish those results in the Job Configuration:
Open your Job, select Configure, scroll down to Post-build Actions and check Publish Checkstyle analysis results and the other ones. For each tool you have to specify the paths where the results are located, for example bin/checkstyle_report.xml.
your build runs the maven goal checkstyle:checkstyle

Using unitils/dbMaintain to maintain database, how to exclude scripts from being run?

I am using unitils (and its dbMaintain module) to maintain the state of my local database.
dbMaintain has an option to exclude/include scripts based on a qualifier. See http://www.dbmaintain.org/tutorial.html#Qualifier_inclusion__exclusion.
In my project, excludes/includes do not work when running from a Unitils test with the UnitilsJUnit4TestClassRunner.
My script hierarchy:
unitils/
01_create/ <lots of scripts here>
02_lkups/ <lots of scripts here>
03_#testdata/01_#testdata_master/05_#testdata_master_rate_offer.sql
My unitils.properties file has:
updateDataBaseSchema.enabled=true
dbMaintainer.script.locations=unitils
dbMaintainer.qualifiers=testdata
dbMaintainer.excludedQualifiers=testdata
I would expect 05_#testdata_master_rate_offer.sql to be excluded. But it is being run.
Thanks in advance for any help.
Answered by one of the unitils developers on the unitils forums here: http://sourceforge.net/projects/unitils/forums/forum/570578/topic/4546980
Qualifiers are a feature of
dbmaintain. Unitils 3.1still contains
its own dbmaintainer which still dates
from before the split-off of
dbmaintain. Unitils 4.0 has this
module replaced by a dependency to
dbmaintain, but this version is not
released yet. I would suggest that,
until 4.0 is released, you call
dbmaintain directly from your java
code. Hope this helps, Filip

Create a Spring Insight template

I am just listing here the basic steps to create a Spring Insight web application using Spring tcServer developer edition. I haven't found much doco regarding this, so it could help some people.
1 - Download Spring Tool Suite here
Download STS
Extract the archive somewhere on your machine, open a terminal and go to ~/tc-server-developer-[VERSION]/
2 - Run the following commands
./tcruntime-instance.sh create -t insight myInstance
This one creates a new tcServer instance based on the template insight. (full list of templates can be found in ~/tc-server-developer-[VERSION]/templates/)
Go to ~/tc-server-developer-[VERSION]/myInstance/bin/ and run the following
./tcruntime-ctl.sh start
This will start your tcServer instance based on the Spring Insight template. Check it is working by pointing your favourite browser to the URL http://localhost:8080/insight. That should display the Spring Insight index page.
Now you just have to drop your web app in the ~/tc-server-developer-[VERSION]/myInstance/webapps/ folder and Bob's your uncle !
Also wanted to mention how to set this up from the IDE without having to do any command line work
Assuming you have a spring mvc project open already in STS. This took a while to find so thank you for posting.
Add a new server from the servers window. Select the VFabric tcServer
Create new instance
When you get to the part where it asks you to select a template pick the insight template.
Add you app to the server you just created
Start the server
You will be prompted if youwant to activate insight, click yes.
Navigate to localhost:8080/insight or whatever port it is running on.
You can find more details here: http://pubs.vmware.com/vfabric5/index.jsp?topic=/com.vmware.vfabric.tc-server.2.6/devedition/install.html&path=2_3_1_0