How to Customize HTMLReports of Gatling - scala

I'm trying to customize HTMLReport of gatling to get results (and charts) between 2 specific time (I don't want all results only a time range.
How can I do that ? I didn't found a documentation about that.
Thanks

It's officially not possible to customize the report with regular version of Gatling.
To get another report there is no option but to get Gatling Frontline : https://gatling.io/gatling-frontline/

Related

testcase failed when getting variable output from bot using botium box

I am using botium-box. I have the following convo file:
Here the date is a variable and changes everyday so I have to change it everyday in convo file otherwise the testcase is failing.
I have tried few solutions:
setting SCRIPTING_ENABLE_MEMORY to true in advance settings and using
placeholder for variables. For eg.
I tried setting INTENT_CONFIDENCE to 70 in advance settings and using
in convo file. For eg:
I tried INTENT_CONFIDENCE directly in convo file without setting it in advance capabilities. For eg.
I tried using %s in place of variable. For eg.
Testcases are still failing. Is it a bug? Do I have to change any Botium settings? How can I do partial matching of responses?
Solution 1 should be working (see here and here). If it doesn't work, please attach log file for analysis.
Options 2 and 3 are for something totally different (verification of intent resolution confidence), and Option 4 is not a Botium feature.
What you can try as well: Botium by default does substring matching for assertions, so your convo file could look something like this:
#me
what is the date today ?
#bot
Today is

Variable code coverage threshold with sbt-scoverage

I'm using sbt-scoverage plugin for measure the code (statement) coverage in our project. Because of months of not worriying about the coverage and our tests we decided to set a threshold for having a minimum coverage percentage: if you are writing code at least try to leave the project with the same coverage percentage as when you've find it. e.g. if you've started your feature branch with a project having 63% of coverage you have, after finishing your feature, to leave the same coverage value.
With this we want to ensure a gradual adoption of better practices instead of setting a fixed coverage value (something like coverageMinimum := XX).
Having said that, I'm considering the possibility of storing the last value of the analysis in a file and then compare that with a new execution, triggered by the developer.
Another option that I'm considering is to retrieve this value from our SonarQube server based on the data stored there.
My question is: Is there a way to do a thing like this with sbt-scoverage? I've dug into the docs and their Google Groups forum but I can't find something about it.
Thanks in advance!
coverageMinimum setting value doesn't have to be constant, you can write any function dynamically returning it, eg:
coverageMinimum := {
val tmp = 2 + 4
10 * tmp // returns 60 :)
}

How to get total error count from Klocwork automatically

I have a project running in Klocwork and after the build gets completed the Klocwork results will be generated. Every time I need to go to the Klocwork portal to get the results and look for the new issues or the total issues. Instead I need an API or script to get the total number of issues from the Klocwork results automatically when the build is successful.
Is there any way to achieve this? One way is to view the portal page source as html and get the result I need. However, I think there might be a better solution.
Can someone help me in achieving this?
Thanks in advance.
I answered a similar question over here. Below is an updated answer with links to the documentation for the most recent release, Klocwork 11.
Klocwork has a WebAPI which you can use to query this type of information from your favorite scripting language, or for example with curl. API documentation is also provided on your Klocwork server at http://klocwork_server_host:port/review/api, for example http://localhost:8080/review/api.
The query:
curl --data "action=search&user=my_account&project=my_project&query=build:build_1 status:Analyze state:New,Existing&ltoken=xxxx" http://localhost:8080/review/api
will return a list of all open (state New and Existing), non-cited (status Analyze) issues found in a build named build_1 of project my_project.
For a list of the keywords you can use in the query string with the search action, see Searching in Klocwork Review.
If you want just a summary of the number of defects instead of getting the whole list, you can use the report action:
curl --data "action=report&user=my_account&project=my_project&build:build_1&x=Category&y=Component&filterQuery=status:Analyze state:New,Existing&ltoken=xxxx" http://localhost:8080/review/api
which returns back a summary of the number of defects by checker category (taxonomy) and component. Sample output is below:
{"rows":[{"id":1,"name":"C and C++"},{"id":3,"name":"MISRA C"},{"id":4,"name":"MISRA C++"}],"columns":[{"id":5,"name":"System Model"}],"data":[[122],[354],[890]],"warnings":[]}
You can modify the x and y axis parameters to produce different breakdowns of the issues, for example by Severity and State instead:
curl --data "action=report&user=my_account&project=my_project&build:build_3&x=Severity&y=State&filterQuery=state:New,Existing,Fixed&ltoken=xxxx" http://localhost:8080/review/api
output:
{"rows":[{"id":1,"name":"Critical"},{"id":2,"name":"Error"},{"id":3,"name":"Warning"},{"id":4,"name":"Review"}],"columns":[{"id":-1,"name":"Existing"},{"id":-1,"name":"Fixed"},{"id":-1,"name":"New"}],"data":[[10,5,2],[20,6,1],[45,11,3],[1112,78,23]],"warnings":[]}
The WebAPI cookbook documentation has an example of using python with the report action and processing and formatting the response.

BIRT: Getting started with the Chart API

So I need a few simple pointers with the BIRT chart API.
I am trying to draw a simple line chart of a numeric value over time. I have a vector of (Date,Double) pairs as input. I have read through the examples in org.eclipse.birt.chart.examples but not yet gained enough traction with the API to start making use of it. Just composing a org.eclipse.birt.chart.model.impl.ChartWithAxesImpl has me stumped.
The eventual destination is an Eclipse editor, and that I can do. Is there a tutorial or book anyone can recommend that might get me going with the BIRT chart side?
I should be very grateful
M.
Well. There is this example: http://www.eclipse.org/articles/article.php?file=Article-BIRTChartEngine/index.html
But I am having some problems actually getting it to work myself. All I end up with is an exception like this:
java.lang.NullPointerException
at org.eclipse.birt.chart.device.swt.SwtTextMetrics.getHeight(SwtTextMetrics.java:178)
at org.eclipse.birt.chart.computation.Methods.computeFontHeight(Methods.java:1272)
at org.eclipse.birt.chart.computation.BIRTChartComputation.computeFontHeight(BIRTChartComputation.java:30)
at org.eclipse.birt.chart.computation.EllipsisHelper$SimpleTester.<init>(EllipsisHelper.java:213)
at org.eclipse.birt.chart.computation.EllipsisHelper.createSimpleTester(EllipsisHelper.java:176)
at org.eclipse.birt.chart.computation.EllipsisHelper.simpleInstance(EllipsisHelper.java:183)
at org.eclipse.birt.chart.computation.LabelLimiter.limitLabelSize(LabelLimiter.java:256)
at org.eclipse.birt.chart.computation.LabelLimiter.limitLabelSize(LabelLimiter.java:211)
at org.eclipse.birt.chart.model.layout.impl.TitleBlockImpl.computeBox(TitleBlockImpl.java:288)
at org.eclipse.birt.chart.model.layout.impl.LabelBlockImpl.getPreferredSize(LabelBlockImpl.java:266)
at org.eclipse.birt.chart.internal.layout.LayoutManager$ChartLayout.<init>(LayoutManager.java:111)
at org.eclipse.birt.chart.internal.layout.LayoutManager.doLayout_tmp(LayoutManager.java:1145)
at org.eclipse.birt.chart.internal.layout.LayoutManager.doLayout(LayoutManager.java:1310)
at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1092)
I had the same trouble with the examples from org.eclipse.birt.chart.examples. There are some good java code snippets, but you do not see to what they correspond. This is why I decided to generate all the examples and put them on a web site: BIRT Charts Gallery.

Crystal Reports 8.5 / 9 - How do I remove a "default" value for a parameter?

Can anyone enlighten me on how to find and remove a default parameter in Crystal Reports 8.5 and/or 9? I get all confused by visual code techniques like this where I can't just grep the codebase and find the string I need to remove. :D
Basically, it looks like the former developer saved the report with a couple parameter fields populated, and I'm not sure how to un-populate them. So when I open this report for the first time and execute it, it just asks me for my database credentials - I never even see the:
Use current parameter values
Prompt for new parameter values
radio button selection the first time it is executed.
Any advice is appreciated.. thanks in advance!
In case anyone else happens upon this and needs a solution:
I have to uncheck
File -> Options -> Reporting -> Save Data With Report.
May this make your Crystal Reporting just a little less traumatic.