How to protractor-html-reporter-2' package to generate html report with specs name - protractor

above question concept, I want to multi-specs after execution, And I wanted to see test suites with that test suites spec name also in the generated Html report

Related

Change the request body

In Insomnia test suite, is it possible to add or update the request body?
For example, I have get/post request in a collection which takes a json as request body, I like to test the request by changing this json. By default in test suite I can select a request and the defined json (under collections) is used for testing, what if I want to change this json request?
An example code is
const response1 = await insomnia.send();
expect(response1.status).to.equal(200);
Is it possible to change what is posted in insomnia.send() within the test suite? As of now I have to go to the collection change this json but what if I want to test the same api end point with different jsons?
I am aware, I can test it under collection (Debug tab) by changing the JSON and directly testing there but I am trying to leverage the test suite to write a bunch of test against an end point. Insomnia uses Mochajs for testing, is there any sample of that used long with insomnia?
I cannot find any pointers in Insomnia documentation.

How to create a composed test fragment

Let's suppose that to make a REST request C, I need to make a request A and a request B as a set up for the business case.
I know how to run 3 requests sequentially in jmeter, but I want just to C be measured by jmeter stats to see tps and response time. Is there a way to do that?
Let's say that A and B not necessarily will be executed in a near time in a real case, but they need to be requested before C.
There are 2 options:
Add JSR223 PostProcessors as children of requests A and B and use the following code:
prev.setIgnore()
this line will invoke SampleResult.setIgnore() function suppressing the output of the sampler(s) in the JSR223 PostProcessor's scope. Check out Top 8 JMeter Java Classes You Should Be Using with Groovy article for more information on JMeter API shortcuts available for JSR223 Test Elements.
Another option is using Filter Results Tool which allows removing "not interesting" entries from the .jtl results file. Filter Results Tool can be installed using JMeter Plugins Manager (you will need Merge Results as well), example command line would be something like:
FilterResults.bat --output-file onlyrequestc.jtl --input-file result.jtl --include-labels "Request C"

How to add content-disposition header in OpenAPI 2.0 specifications

I am new to OpenAPI specification and currently working on a project which uses OpenAPI specification 2.0. We also use swagger-codegen to generate REST interface from this specification file.
Now, I am stuck in a scenario where I have to pass an Excel file as a output to the REST call so to do that I need to mention content-disposition in response header for this REST API in OpenAPI specification so that auto generated code also has the same thing.
Is there a way to do that so that my auto generated code automatically detects that header?
....
Object res = service.exportData(body);
return Response.ok(res).build();
....

Perl - XML::LibXML: bad parsing performance on Apache2 default page

I was testing some code and parsing XML was included. For simple testing I requested / of my localhost and the response was my Apache2 default page.
So far, so good.
The response is XHTML and therefore XML. So I took it for my parsing (~11k of size).
XML::LibXML->load_xml (string => $response);
It takes about 16s till it finishes with no error.
If I give it an other xml-file with double the size if need 0 time.
So...why????
Apache/2.4.10
Debian/8.6
XML::LibXML/2.0128
EDIT
I need to mention that I removed the non-XML HTTP-header.
So the string starts with
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
and ends with
</html>
EDIT
Link: http://s000.tinyupload.com/index.php?file_id=88759644475809123183
One possibility is that each time you parse the document the parser is downloading the DTD from W3C. You could confirm this using strace or similar tools depending on your platform.
The DTD contains (among other things) the named entity definitions which map for example the string to the character U+00A0. So in order to parse HTML documents, the parser does need the DTD, however fetching it via HTTP each time is obviously not a good idea.
One approach is to install a copy of the DTD locally and use that. On Debian/Ubuntu systems you can just install the w3c-dtd-xhtml package which also sets up the appropriate XML catalog entries to allow libxml to find it.
Another approach is to use XML::LibXML->load_html instead of XML::LibXML->load_xml. In HTML parsing mode, the parser is more forgiving of markup errors and I think also always uses a local copy of the DTD.
The parser also provides options which allow you to specify your own handler routine for retrieving reference URIs.

Receive Prompts from a report using REST services for Pentaho

I was wondering if it is possible to receive the prompts used (with possibly all it's options) in a report using REST services.
What I like to achieve is receiving the prompts and if possible all the options for those prompts in an XML format from any given Pentaho report. I know there are rest calls for basic repository listings etc... but I can't seem to find this specific call.
It is possible to get full parameters xml (which includes parameters, parameters values, parameters attributes as far as info which is used to create report prompts) - full parameter info. You need bi server and reporting plugin. The url is:
http://localhost:8080/pentaho/api/repos/"%"3Apublic"%"3ASteel"%"20Wheels"%"3AInventory"%"20List"%"20(report).prpt/parameter
And we have to pass parameter renderMode with value: PARAMETER.
Here we call to report under /public/Steel Wheels/Inventory List (reprot).prpt
or simplifying -
"http://localhost:8080/pentaho/api/repos/<path_to_report>.prpt/parameter"
You can open browser and inspect requests responses just on fly:
On a screen is actually parameter requests you are looking for.