1

I am working on selenium tool and trying to create a html reports of my own using json as a data source to create a simple and neat report.

I understand that there are extend and allure testng and other reports already available, but I want to try and learn to create a report own.

I will be using json java library to create json object which will result like below

{
"Tc01" :{
 "Chrome" :[
    {
        "Expected" :"Button should be clicked, 
        "Actual" :Button clicked", 
        "Status" :"Pass" 
    } 
 ] 
} 
}

I want this json object to be represented as a test report table.

Please pass me your suggestions thanks in advance

3
  • not sure JSON is necessary unless you are creating a sort of view API that takes it as a parameter. Otherwise just create the HTML/table in Java. You can view my HTML report methods here (from my hobby project): github.com/pcalkins/browsermator/blob/master/src/browsermator/… Jun 19, 2020 at 19:51
  • Hi, can u please post sample report file in this chat or in github
    – Learnfever
    Jun 20, 2020 at 6:07
  • You can just download from here, run a test (there's some samples in the browsermator cloud) and check the box to output report: browsermator.com Jun 21, 2020 at 22:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.