githubActions : how display a test coverage? - github

I use github actions.
My gradle project use jacoco to produce a test coverage report, on the form of a website.
How can I display it directly on the browser ?

Actually when JaCoCo builds report in html format it produces a bunch of files and folders. So, there is no possibility to open that main html file directly in your browser. But here are possible solutions that might be useful for you:
Publish generated static files on some server, like GitHub Pages for
example. Where you can see generated report in a website mode (you
can configure notification with the link when published report is
ready).
Archive generated report and upload it as artifact. Then you
can easily find each report for each job if needed.
Build report as xml and just print it in output window.
Archive generated report and send it to some your running server.
Based on your needs maybe you find some of these suggestions useful but probably first option only directly answers your question.

Related

install4j project report generates empty html file

I'm reviewing install4j (9.0.7, windows 10) and have created a simple java installer with some additional screens to enter custom variables that we use to configure our product.
The installer that is generated seems to work ok.
Because it is recommended for search purposes (to see were for example you are using custom variables) to generate a "project report" I tried this and to my surprise it generates an empty html file of 0kb in size.
Is this a "bug" or did I miss something that I should have done before generating the project report.
Any help is greatly appreciated.
This is a regression that can happen in 9.0.7, it will be fixed in the next bugfix release. Please contact support#ej-technologies.com to get a build where this is already fixed.

Get Xspec test results with inline CSS within Ant

Xspec delivers HTML reports with test results. I'm looking for a way to avoid having an absolute path to a CSS file in the Xspec report.
I saw that there is a command-line option -i to place the CSS inline in the HTML page. The script version uses inline=true as the default.
However, the default in the stylesheet to format the HTML report is false. I'm calling Xspec from Ant, and I don't seem to find a way to add this option in the Ant call. Is this possible?
I'm answering this even if you found out the answer by posting on GitHub, hopefully it will be useful for other people.
As answered on GitHub, the functionality to have inline CSS when running XSpec with Ant is currently in two pull requests which should be merged soon into the master branch of XSpec. In the meantime you can use the branch in this pull request to have this functionality. Any feedback is greatly appreciated!

Version Control with Jaspersoft Server Queries / Input Controls

As anyone who has used Jasper Reports would know, a single report in Studio does not always encapsulate everything that a report is. There are Input Controls that can exist outside of the report as well as Queries that may be responsible for populating the controls.
Jaspersoft does not make it easy to obtain and version the entities that exist outside of the normal report JRXML files that you design in Studio. As of now, the only way I've been able to even somewhat accomplish this is like so:
Create Query and Input Control in DEV environment
Export the ZIP file that Jasper generates for said Query and Control
Extract the files and blow away or hand-modify the connection information in the Data Source, because Jasper packages everything associated with an item.
Add necessary files to SCM.
ZIP files up.
Import ZIP file in to QA environment, and then Staging, and so on.
While this can be somewhat automated, it seems like anyone working with Jasper has to jump through hoops to actually version their reports. Am I missing something, or is this really just the nature of things in this space?

JasperReports Server cant find sub reports

I have a main report which calls a sub report which calls another sub report.
I have all 3 in a dir called dash2 in report studio.
When I use report studios deployment to *JasperReports Server * on the main report, it also seems to deploy the first sub report (but not the sub sub report). Well, If I right click on the report and select edit, then Controls and Resources, it lists the sub report.
If i manually deploy all 3 reports one by one, I see all three in the report folder in Jaspersoft Studio. However, if I try to run the main report, I get:
Error filling report
net.sf.jasperreports.engine.JRException: Resource not found at : dash2/dash-kpi.jasper
So its looking for the sub report in dash2. So I created a dir called dash2 under the main report folder, and copied the sub reports into it. Same error. So I manually reproduced the same structure as in report studio -no joy. It can never find the sub report.
In the main report, it has this entry:
<subreportExpression><![CDATA["dash2/dash-kpi.jasper"]]></subreportExpression>
Any ideas how to fix?
It works fine in report studio.
Edit: tried removing the "dash2/" from in front of the resource name. didn't help.
Edit2: tried chaing all occurunces of dash2/xxx.jasper to repo:xxx.jrxml. This breaks jasper studio in that:
the reports no longer work in studio
when you upload the main report, it no longer recognises the dependent sub reports and doesn't upload them.
I tried manually deploying all reports, but there is no way to link a main report with an existing sub report in jasper server. The only option they offer is to edit the main report, and manually upload the jrxml files as resources. I tried this, but didn't help, still cant find them:
Repository file resource /reports/dashboard_files/dash_kpi.jrmxl could not be loaded
Interestingly, its using a dir called dashboard_files which doesnt exist. There is no reference to this dir in any of the reports jrxml files.
After much pain, I found a solution. It seems that jasper studio is not really good with nested sub reports. Here is a solution at a high level, which applies to server 5.6 and Studio 5.6 at least:
Start off with the reports with sub reports defined as "xxx.jasper" in studio.
Deploy the main report to jasper server. It will ask you if you want to deploy the sub reports (but not their sub reports). However, it does not do it right, and we have to fix it.
Now connect to the server from studio (aka repository explorer)
Your report will be under SErvers->your server->Reports->reportname->Main.jrxml. Right click on it and select properties. Select Resource Editor Tab.
copy the Parent Folder path. e.g. /reports/myreport_files
Now go back to studio. Edit every place in all your reports and sub reports where you have "xxx.jasper" and replace them with "repo:/reports/myreport_files/xxx.jrxml"
save everything
Deploy the main report again.
in Jasper Server, find the report, right click on it and select EDIT
Click on "Controls and Resources".
Delete all the resources
Now Add back each sub report by uploading by hand each jrxml file. Make sure you give it the same name and ID ans the file, e.g. my_sub_report.jrxml
pray it works.
NOTE 1: if you have any "-" in your subreport names, they will be converted to "", and it wont find them. rename all your subreports with "-" to use "" insead, remove and re-deploy.
NOTE 2: Now your reports wont work in studio. Nice one Jasper. You can try using parameters, e.g:
$P{IsOnServer} ? "repo:/reports/myreport_files/my_sub.jrxml" : "my_su.jasper"
And create the parameters defaulting to true, but I could not get this to work.
Main credit to these guys:
http://notsomany.wordpress.com/2011/11/07/subreports-within-ireport-jasper-reports-server/
Linking subreports in iReport so they also work in Jasper server
I have overcame this problem by simply NOT using the onServer parameter.
Should you put just the file name, the Studio can grab this file and deploy it automatically.
Strangely enough, this works on the server as well.

How to automatically run crystal reports

Once a week I need to run a bunch of Crystal Reports and then email them. I want to know if there's a way to run them automatically? I've tried using Crystal-Delivery, but for some reason it only runs the reports that don't have parameters.
Has anyone used Crystal-Delivery before and have a solution for my problems? Their forum is not very helpful. Or is there other software that can do what I need.
Yes there are various solutions, including Crystal Delivery which I have used successfully with reports with parameters. After adding the report double click, and complete the "parameters" tab.
There's a few ways one can skin this. There are various options to build a pdf from a given report (if you're building in java for instance) and one can fairly easily run the java on a cron, and then have a mail script running on cron to send out those files once they've been created (that mail script could be in php or java or whatever takes your fancy).