1

I want to customize extent report for Cucumber. I am using Java testng cucumber framework. I want to add pass/failed ticks at the left side of each step/scenario. Can you please guide me to set the extent configurations?

Adding screenshots below Actual Report screenshot:

Actual Report link

Expected Report screenshot:

Expected report link

I have tried below extent.properties configuration

my extent.properties file details

extent.reporter.spark.start=true
extent.reporter.spark.out=Reports_cucumber/Spark.html
extent.reporter.spark.config=spark-config.xml
extent.reporter.pdf.start=true
extent.reporter.pdf.out=Reports_cucumber/Spark.pdf
extent.reporter.bdd.start=true
extent.reporter.bdd.out=test-output/BddReport/
extent.reporter.spark.base64imagesrc=true
#FolderName
basefolder.name=Reports_cucumber/Report_
basefolder.datetimepattern=d_MMM_YY HH_mm_ss
screenshot.dir=/screenshots/
screenshot.rel.path=../screenshots/

and

extent-config.xml file details

<extentreports>
  <configuration>

    <!-- report theme -->
    <!-- STANDARD, DARK -->
    <theme>STANDARD</theme>

    <!-- document encoding -->
    <!-- defaults to UTF-8 -->
    <encoding>UTF-8</encoding>

    <!-- protocol for script and stylesheets -->
    <!-- defaults to https -->
    <!-- HTTP, HTTPS -->
    <protocol>https</protocol>

    <!-- offline report -->
    <timelineEnabled>true</timelineEnabled>
    
    <!-- offline report -->
    <enableOfflineMode>false</enableOfflineMode>
    
    <!-- use thumbnails for base64 images -->
    <!-- this may slowdown viewing tests -->
    <thumbnailForBase64>false</thumbnailForBase64>

    <!-- title of the document -->
    <documentTitle>eSurety</documentTitle>

   <reportName>
         <![CDATA[
               
               <img src="https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,h_170,w_170,f_auto,b_white,q_auto:eco,dpr_1/sssvfnewhku9z4tqmovr"  style="width:50px;height:40px;" ;>
               <font size="5" >    TEST  RESULTS    </font>
              
                ]]>
        </reportName>
                
    <!-- timestamp format -->
    <timeStampFormat>MMM dd, yyyy HH:mm:ss</timeStampFormat>


        <!-- custom javascript -->
        <scripts>
            <![CDATA[
                $(document).ready(function() {
                    $('.logo-container.grey darken-2').css('display','block');
                });
            ]]>
        </scripts>
      
    <!-- custom styles -->
     <scripts> <![CDATA[$(document).ready(function() {$('.dashboard-view').click();});$('.col.s12:nth-child(2) .card-panel.nm-v').hide();$('.col.s2:nth-child(2)').hide();$('.col.s12:nth-child(1)').css('width', '100%');$('.row .col.s2').css('width', '25%');]]> </scripts>
        
    <styles>
     
    </styles>

  </configuration>
</extentreports>

SternK
  • 11,649
  • 22
  • 32
  • 46
Amey
  • 11
  • 6
  • write the custom javascript within 'js' xml tags, similarly css in 'css' tags. styles and scripts tags are no longer valid – Grasshopper Aug 25 '23 at 13:29

0 Answers0