Export TestNG result into a csv [java, maven]

102 views
Skip to first unread message

Vince Nándorfi

unread,
Jan 9, 2023, 2:32:37 AM1/9/23
to testng...@googlegroups.com
Hi,

I would like to do a csv file after my each execution. Solution should append a new row like this:

                                col1 = passed | col2 = failed | col3... skipped | duartion | pass rate | date etc
row 1 = execution 1          10                      0                      0              500ms        100%       2023...
row 2 = execution 2            9                       1                     0              511ms         90%        2023...
row 3 = execution 3   ...........

I need these kind of a csv file after test finished its job for later metrics in a tool or an excel file.

I have red many articles but found nothing relative easy to go or non-so-hacking solution.

Any idea? Like is there any cultured way to get those result what you already has in xml and html reports?

⇜Krishnan Mahadevan⇝

unread,
Jan 9, 2023, 3:00:58 AM1/9/23
to testng...@googlegroups.com
Vince, 

You need to build an implementation of org.testng.IReporter wherein you construct your CSV values by reading the data from 
current execution and then appending the results to an existing file.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/CAMN2m6XiTJPqVMbU5L3%3Df43HvahkB%2Bswq%2BzvwK8sOpERYjbdrA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages