Make mochawesome custom report - mochawesome

I am generating cypress report using mochawesome, which is default UI.
I need to make it custom.
Heading - Test Summary
Number of Total Pass case
Number of Total Fail Case
On click on Total Number of pass test case , accordion will be open and will display Test Name and time which took to run test case
On click on Total Number of failed test case , accordion will be open and will display Test Name and time which took to run test case
and reason of failed

Related

Do we have an API to get Test Cycle Summary in Qtest?

Do we have an API in Qtest that can provide summary of test cycle execution ?
E.g. Passed: 23 Failed: 7 Unexecuted: 10 Running: 2
Need this data for generating report in our consolidated reporting tool along with data from some other sources.
Nothing that gives exactly what you ask for, but you could use the API calls below to create it yourself.
You can get the status of all test runs in a project using
GET /api/v3/projects/{projectId}/test-runs/execution-statuses
Or, to get results from a specific test cycle, first find all the test runs in that cycle using
/api/v3/projects/{projectId}/test-runs?parentId={testCycleID}&parentType=test-cycle
(append &expand=descendants to find test runs in containers under the test cycle)
and then get the results of each run individually using
/api/v3/projects/{projectId}/test-runs/{testRunId}/test-logs/last-run
See https://qtest.dev.tricentis.com/

Retrieve only one rows with two status

Below is my data.
I want to see the Job status only. I'm taking Job Name ans Status in Matrix and it is showing mw the job status as well if job is successfully completed. but the problem is if a job is failed the it is showing me two status for one job. Success and Failed both. where in I only want to see if all step is success then it should show success and it any of step is failed then it should show as failed with one row or if it is running then it should show as running.
Below is the output which I'm getting right now.
Where in the expected output is as below.
This is because one step is completed and one step is failed and it is showing both result since it is not unique. hence requesting you to kindly suggest a solution.
If you want to show only last step then create a measure and put it to the matrix (or filter pane);
MeasuretoCheckLastStep =
var _lastStep = calculate( max(Table[StepID]), FILTER(ALL(Table), Table[JobName] = SELECTEDVALUE(Table[JobName]) )
return if(_lastStep = SELECTEDVALUE(Table[StepID]) , 1, 0)

How to do get the Retries tab with retries instead of several test with the same name in the Allure report?

I generate the Allure report after launch a test with #RepeatedIfExceptionsTest tag with the graldew test command but got several separated tests with the same name. The Retries tab is empty. How to do get the Retries tab with retries instead of several test with the same name in the report?
#Issue("123")
#Flaky
#Link(value = "Link1")
#TmsLink(value = "TmsLink1")
#Issue(value = "Issue11")
#Tag(value = "tmp")
#RepeatedIfExceptionsTest(name = "Find even number", repeats = 3)
public void findEvenNumberTest(){
int randomNum = ThreadLocalRandom.current().nextInt(1, 3);
assertEquals(randomNum%2, 0);
}
Retries tab is responsible for history of your test runs. So when you run a test 2 times and generate your report then on Retries tab you'll see 2 runs.
Retries tab gets json files that are created after each run. But I guess that when within one run you execute a test 3 times then it's result will be stored in 1 json file so Retries tab won't take it as it needs 2 or more json report files.
So you just misunderstood functionality of Retries tab.
Another tricky tab is History. It's almost the same as Retries but based on info from this tab, the widget on the main page is generated. To make History tab not empty you need to copy "/report/history" folder to "/allure-results/history" and then regenerate your report from "/allure-results"

Is there anyway that I can mark a test case passed or failed from within the test case itself

If I am withing a test case in VSTS is there any way I can mark this test "Passed" or "Failed" without going back out to the Test Hub?
No, we cannot mark the outcome to "Passed" or "Failed" within test case itself.
Test case is a work item type, a test case is just a work item and the work item itself doesn't have a field with the value "Passed" or "Failed".
The outcome "Passed" or "Failed" is just for test result, so you have to make a test run to pass or fail the test case. You can check that a new test run will be generated when you mark a test case to passed or failed in Test Hub. (Just check that under Test --> Runs)

automated testing ngx-datatable using robotframework with selenium

Has anyone used robotframework to test ngx-datatable? Since it isn't set up like a regular table, the selenium libraries Get Table Cell function doesn't work. Does anyone have an example of a work-around?
I've come up with a script that works for the time being.
*** Variables ***
${Table} = css=div[class^="datatable-row-center"]
*** Keywords ***
Get Value From Grid
#{RowNumber} 0 is the header
#{ColNumber} 0 is first column
[Arguments] ${RowNumber} ${ColNumber}
Sleep 3s
#{Table_Rows}= Get Webelements ${History_Table}
${Text}= Get Text #{Table_Rows}[${RowNumber}]
#{words} = Split String ${Text} \n
Log to Console #{words}[${ColNumber}]
[Return] #{words}[${ColNumber}]
This works as long as the class on the table rows remains 'datatable-row-center'