We are using allure to generate report for our jasmine protractor test suite.
All suites are shown in suites tab with respective tests
Is there any way that I can categorize suites,based on different group names for the suites like smoke, Sanity...
Below is the requirement
-----SmokeSuite
-----------testsuite1
-----Test1
-----Test2
-----Test3
-----------testsuite2
-----Test1
-----Test2
-----Test3
-----SanitySuite
-----------testsuite1
------Test1
------Test2
------Test3
-----------testsuite2
-----Test1
-----Test2
-----Test3
-----RegressionSuite
-----------testsuite1
------Test1
------Test2
------Test3
-----------testsuite2
-----Test1
-----Test2
-----Test3
Related
I have 5 scenarios and those tags are
#UserAddSaveButton, #UserEditSaveButton, #UserAddSaveContinueButton, #UserEditSaveContinueButton, #UserDelete
Now I want to execute all 5 scenario in below sequence
#UserAddSaveButton, #UserEditSaveButton, #UserDelete, #UserAddSaveContinueButton, #UserEditSaveContinueButton, #UserDelete
See #UserDelete tag is used twice but when I execute Maven command it's executed only once and at last position is not working.
Nope, you can't achieve this with a single TestRunner file.
Here are my 2 ways:
Solution#1:
Create 3 TestRunner files
In your testng.xml file, create 4 <suite> tags that contains TestRunner test classes in this order - TestRunner1, TestRunner2, TestRunner3 and TestRunner2
TestRunner1 to execute '#UserAddSaveButton, #UserEditSaveButton' tags
TestRunner2 to execute '#UserDelete' tag
TestRunner3 to execute '#UserAddSaveContinueButton, #UserEditSaveContinueButton' tags
Now run your tests (as mvn test or from testng.xml), deletion scenario will be executed as mentioned in testng.xml order by TestRunner2 suite#2 and suite#4 as you expected.
Solution#2:
Make your deletion tests/steps in single function
Create conditional hooks
#After("#UserEditSaveButton or #UserEditSaveContinueButton")
public void deletionSteps(){
// your deletion steps goes here OR
// call your deletion step from here
}
Just have single TestRunner file for tags '#UserAddSaveButton, #UserEditSaveButton, #UserAddSaveContinueButton, #UserEditSaveContinueButton'
The conditional #After hook will take care of performing the deletion (You can remove the deletion scenario from your feature file)
However, non-technical users will not know that deletion is performed after the execution of #UserEditSaveButton OR #UserEditSaveContinueButton scenarios.
I am looking for a way to tag Jmeter test cases.
We are using Jmeter for functional test , so we have a lot of test cases , not every test cases are run for every application configuration.
So based on configuration we need tag our test cases and run the test set accordingly from command line.
(Some thing we can do in testng and other framework , where you tag TC and during run you provide the tag so that TC only with that tag are executed)
If there is no tagging available then i feel that i will need to create multiple test set as per configuration and run them accordingly.
In most cases the Test overlap between this test sets and this will result in duplication and require quite a good maintenance.
Please suggest if you all see any solution to this problem.
One solution that I can think of is explained below:
- Declare a property for every test cases
- Process that property to execute your test cases. Use If Controller to check whether that property is passed or not
- Control that property via command line or via GUI. If you want to run some of them pass that property only.
Practical example is shown below:
Test Plan will look like this:
Test Case steps will be inside If controller, and if controller will decide whether to run that Test Case or not, depending upon what you are passing in that property.
Property declaration for all you test cases.
I have designed this in such a way that you can execute that via GUI as well as via command prompt.
If Controller logic
${__BeanShell("${TC1}"=="ON",)}
Execution via command line
jmeter -n -t <>.jmx -JTC1=ON -JTC3=ON -j sample.log
Here I am running TC1 and TC3, depending upon your requirement you can pass whichever scenario you need to execute.
Cypress tests with mocha multi reports don't show results from all the tests
My test structure looks like so:
cypress
integration
module1
module1test1_spec.js
module1test1_spec.js
module2
module2test1_spec.js
module2test1_spec.js
I have set up Cypress to use mocha-multi-reports like in instruction provided under https://docs.cypress.io/guides/tooling/reporters.html#Multiple-Reporters
My config.json looks exactly like here: https://github.com/cypress-io/cypress-example-docker-circle#spec--xml-reports
When Cypress finishes testing, results.xml file shows results from last test spec ONLY; module2test1_spec.js
How to configure this to get the aggregated results from all test spec?
You can use [hash].xml in your path.
e.g. ./path_to_your/test-results.[hash].xml. [hash] is replaced by MD5 hash of test results XML. This enables support of parallel execution of multiple mocha-junit-reporter's writing test results in separate files.
https://www.npmjs.com/package/mocha-junit-reporter#results-report
I solved this problem with this way.
my config.json file seems like this:
"reporterEnabled": "spec,json, mocha-junit-reporter",
"mochaJunitReporterReporterOptions": {
"mochaFile": "multiple-results/[hash].xml",
Just to add to the answer above, if you would like to merge all these multiple [hash].xml created into a single mergedreport.xml report, then you can use this package junit-report-merger which is useful for running it on CI pipeline which usually looks for a single reporter with a command like the one below:
jrm ./cypress/reports/mergedreport.xml "./cypress/reports/*.xml"
I've a feature file with multiple scenarios and different tags for each of the scenarios. I'm running my Cucumber test using the rake command with a specific tag and am creating a custom HTML report.
The custom HTML report is created in a After hook. I am facing a problem as to how to get the count of the scenarios when I'm running with rake command. I use the
scenario.feature.feature_elements.size
to get the count of the total scenarios, but this gives the total scenarios count of the feature file and I'm trying to get only the scenarios count which are tagged with a specific tag.
In a Before hook, keep a count of each scenario's tags in a global as you run them:
Before do |scenario|
$tag_counts ||= {}
scenario.tags.map(&:name).each do |tag|
$tag_counts[tag] ||= 0
$tag_counts[tag] += 1
end
end
After all scenarios have run, you should be able to use the contents of the global in your custom reporter.
I am writing a JMeter suite to run on top of Jenkins and generating charts using the jmeter-graph-maven-plugin.
The tests are being executed with the jmeter-maven-plugin and generating the corresponding *.jtl files that the jmeter-graph plugin expects.
I would like to know all the types of graphs that can be generated through jmeter-graph-maven-plugin when I declare them on the pom.xml as such:
<graph>
<pluginType>ThreadsStateOverTime</pluginType>
<width>800</width>
<height>600</height>
<outputFile>${project.build.directory}/jmeter/results/ThreadsStateOverTime.png</outputFile>
</graph>
Is there a comprehensive list of all possible entries I could use?
Thanks,
Neill
Based on this documentation:
http://jmeter-plugins.org/wiki/JMeterPluginsCMD/
You can generate:
ThreadsStateOverTime = Active Threads Over Time
BytesThroughputOverTime
HitsPerSecond
LatenciesOverTime
ResponseCodesPerSecond
ResponseTimesDistribution
ResponseTimesOverTime
ResponseTimesPercentiles
ThroughputVsThreads
TimesVsThreads = Response Times VS Threads
TransactionsPerSecond