Who Created chercher tech jasmine reporter ?

1.0.3 version released on 7th April 2019. Creates a single report for parallel Run

Chercher tech jasmine reporter is created by a team lead by Pavankumar, and the team members are:

What are the technologies that can use chercher tech jasmine reporter ;

Chercher tech jasmine reporter can be used with any technology where they use the Jasmine framework for testing the code. This reporter is mostly used with JavaScript and its varieties like Typescript, Coffee Script.

For using chercher tech reporter, it is mandatory to have jasmine in your system.

Installation

You can install the chercher tech jasmine reporter by entering following command in your Command prompt/Terminal

npm install chercher-tech-jasmine-reporter

or you can install the package in global

npm install chercher-tech-jasmine-reporter -g

Subscribe to my youtube channel :

How to use chercher-tech-jasmine-reporter

After installation go to your conf file where you have configured your jasmine add below block of code if you do not have Onprepare method

Configuration for non-protractor people :

As you might aware that jasmine can be used with unit testing of javascript code and its variants; if you do not have javascript code, please use the below configuration.

// An example configuration file
var reporter = require('chercher-tech-jasmine-reporter');
exports.config = {
/*
based on your requirements
*/

    onPrepare: function() {
      var ChercherTechJasmineReporter = reporter.ChercherTechJasmineReporter;
      jasmine.getEnv().addReporter(new ChercherTechJasmineReporter({
          showSkipped:false,
          showLineChart:true
      }));
    },
    onComplete:function(exitcode){
      reporter.write_consolidated()
    },

    afterLaunch:function(exitcode){
      return new Promise(function(resolve){
        reporter.processResults()
        return 0
      })
    }
};

Configuration for non-protractor people :

When you are using the jasmine with protractor, then you might need to take screenshots on fail, sometimes you might do not want to take screenshots at all. Set the values accordingly

// An example configuration file
var reporter = require('chercher-tech-jasmine-reporter');
exports.config = {
/*
based on your requirements
*/

    onPrepare: function() {
      var ChercherTechJasmineReporter = reporter.ChercherTechJasmineReporter;
      jasmine.getEnv().addReporter(new ChercherTechJasmineReporter({
          screenshotOnFail :true,
          showSkipped:false,
          browser:browser,
          showLineChart:true
      }));
    },
    onComplete:function(exitcode){
      reporter.write_consolidated()
    },

    afterLaunch:function(exitcode){
      return new Promise(function(resolve){
        reporter.processResults()
        return 0
      })
    }
};

Parameters :

Using the below parameter, you can alter the report according to your needs.

  • screenshotOnFail : Capture the screenshot on the failure of test cases, i.e. it block, if you do not provide browser object then it will not take screenshots
  • showSkipped : We have added this option because sometime you might have n-number of the test, but if you are running only one test case from the describe block, then you might get the result in a report for the skipped Describe blocks. these Skips are more it would occupy a lot of page space, so you can set this value if you do not want to see the skipped describe blocks.

    A describe block is considered as skipped only if all the it blocks are skipped in that describe block.
  • browser : Browser object is important for taking a screenshot in protractor, if your execution does not involve browser then you can avoid the parameter
  • showLineChart : In the below section, you can see a line chart is drawn, stories as X axis and status as y axis, if you do not want the line chart, then set this parameter to false. By default, the showLineChart value is true.

Sample Report Images

Line charts and details :

Line chart provides the details execution graph, from the line chart you can get to know if there are any dependency failures because of previous test cases. You can turn it off if you like line charts in chercher tech report

Pie Charts :

Pie charts provide calculations like how many tests are passed and how many tests are failed and skipped. It will also provide the number of steps/pass/fail/skips, along with pass percentage pie chart in chercher tech report

Tests and Details :

In this section, you will see the details of the user stories and test cases; we will get the details of failures. [Screenshot is only applicable if you are running the test in the browser.] test details in chercher tech report

FAQ

Who can use it :

Anybody can use it as long as they want to use it, but credits should go to the actual creator

Do I need to pay to use it :

Hell, NO, for organizations as well

Do I need to get Permission to use chercher tech reporter :

Nope

Do I need to get permission to republish it :

YES, you should, get our details from About us Page

What is the first version name :

0.0.6

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions
  • Nibedita
    Is there any way we can view network logs, like we can see in protractor beautiful report?
    Reply
  • Niru
    Error: TypeError: reporter.write_consolidated is not a function
    Reply
  • John
    I get an error when I try to run conf.js, running on a Mac Pro. 
           Error: TypeError: ChercherTechJasmineReporter is not a constructor.
           Process exited with error code 100
    
    Following is the conf.ts contents based on the demo.
    import {browser} from 'protractor';
    
    exports.config = {
        framework: 'jasmine',
        seleniumAddress: 'http://localhost:4444/wd/hub',
        capabilities: { browserName: 'chrome' },
        specs: [ './test.js' ],
        //noGlobals: true,
             
        onPrepare: function() {
            return browser.getProcessedConfig().then(function(config){
                var ChercherTechJasmineReporter = require('chercher-tech-jasmine-reporter');
      
              
                jasmine.getEnv().addReporter(new ChercherTechJasmineReporter({
                    screenshotOnFail: true,
                    reportName: 'Provide Report Name',
                    showSkipped: false,
                    browser: browser,
                    showLineChart: true
               }));
            });
        }
    }
    
    Reply
  • atomrat
    I'm not able to generate the html file as expected. The screenshots are created as expected, but not the html page. Following the Protractor example above doesn't seem to be working with version 1.0.3 or 1.0.2. 
    
    When I use the onComplete: with the reporter.write_consolidated(), I get an exception that reporter.write_consolidated is not a function. If I remove the parenthesis, then it no longer complains about the function.
    
    But then it will throw the following error when using the afterLaunch: with the reporter.processResults()
    { [Error: ENOENT: no such file or directory, open 'C:....ConvertedJSFilesmetareport.html']
      errno: -4058,
      code: 'ENOENT',
      syscall: 'open',
      path:
       'C:\...\ConvertedJSFiles\metareport.html' }
    
    Here is my entire config.ts
    <code>
    const reporter = require('chercher-tech-jasmine-reporter');
    
    exports.config = {
        seleniumAddress: 'http://localhost:4444/wd/hub',
        capabilities: {
            'browserName': 'chrome'
        },
        framework: 'jasmine',
        specs: ['.\specs\*.js'],
        jasmineNodeOpts: {
            defaultTimeoutInterval: 90000
        },
        onPrepare: function () {
    
            let globals = require('protractor');
            let browser = globals.browser;
    
            browser.manage().window().maximize();
            browser.manage().timeouts().implicitlyWait(5000);
    
            var ChercherTechJasmineReporter = reporter.ChercherTechJasmineReporter;
            jasmine.getEnv().addReporter(new ChercherTechJasmineReporter({
                screenshotOnFail: false,
                reportName: 'QA Automation',
                showSkipped: true,
                browser: browser,
                showLineChart: true
            }));
        },
        onComplete: function (exitcode) {
            reporter.writeConsolidated
        },
        afterLaunch: async function (exitcode) {
            return new Promise(function (resolve) {
                reporter.processResults()
                return 0
            })
        }
    };
    </code>
    Reply
  • Anand
    I am unable to see the generated files after following steps in this article and running command "ng test --code-coverage". Could you please help me on this. Thank you.
    Reply
    • Anand
      I am unable to see the generated files after following steps in this article and running command "ng test --code-coverage". Could you please help me on this. Thank you.
      Reply
      • Anand
        Could anyone please help me on this.
        Reply
        • John
          There's an issue with the onComplete function - Does not create the metareport.html file.  Error: ENOENT: no such file or directory, open './metareport.html'
          
          Too bad no one monitors this tread, personally like the report, but no support when issues are discovered.    
          Reply
          • John
            After debugging the code, there was a spelling error in the method name.   change the line: "reporter.writeConsolidated" in your conf.ts  to "reporter.write_consoloudated".  works fine.  I bet it will break on the next update when they correct the spelling. 
            Reply
            • Thank You John. After trying multiple times i was not able to recognise the error.  Now it is generationg the report. It was the issue of incorrect method name.
              Reply
  • Alex
    i get an error when i try to use it 
    
    TypeError: Cannot read property 'replace' of undefined
    Reply
    • Oleksii
      Could you please help me. Looks like I miss something in configuration or there is a bug in the reporter. 
      I get the following error when run my protractor tests with this reporter:
         TypeError: Cannot read property 'toJSON' of undefined
        Stack:
              at <Jasmine>
              at getTimeInFormat (./node_modules/chercher-tech-jasmine-reporter/chercher-tech-jasmine-reporter.js:227:29)
              at ChercherTechJasmineReporter.self.specDone (./node_modules/chercher-tech-jasmine-reporter/chercher-tech-jasmine-reporter.js:414:321)
              at <Jasmine>
      
      Versions: chercher-tech-jasmine-reporter@1.0.3, jasmine@3.4.0, protractor@6.0.0
      
      Reporter added in the following way in conf.js file
      
        onPrepare: function () {
          let ChercherTechJasmineReporter = require('chercher-tech-jasmine-reporter').ChercherTechJasmineReporter;
      
          jasmine.getEnv().addReporter(new ChercherTechJasmineReporter({
            screenshotOnFail: true,
            reportName: 'Jabil Default Excess',
            showSkipped: true,
            showLineChart: true}));
        }, 
      
      tests are started with 'protractor conf.js' command
      Reply
  • Amarendra Singh
    How can we override the new report on the previous old report?
    Reply
  • kd
    vkDKVklSNKDVL
    Reply
  • SRINIVASA R GORANTLA
    The report is too good.  it is excellent and nice. I will give you one suggestion when failed the scenario you need to provide log tracer along with a screenshot.
    Reply
  • Chennakesavulu Peddineni
    Is it possible to change report title from ChercherTech Reports to our own customized title?
    Kindly suggest me on this
    Reply
  • Bheemaraju
    How to pass a custom message in reports
    Reply
  • Vijay
    Report Generation for Parallel execution of Specs:
    
    Hey Karthiq,
    
    I am executing specs in parallel mode using shardTestFiles concept, but after execution I am seeing only one execution report which holds details of last executed spec.
    Can you look in to the issue?
    Reply
    • admin[Karthiq]
      Yes, Vijay. We have also noticed it. It creates every describe file as new reporter. Currently We are working on this. With next release we trying to overcome it
      Reply
      • vijay
        Thanks Karthiq for the update..
        Reply
      • Vijay
        When are you planning for next release, any tentative date?
        Reply
      • Vijay
        Any update on the new release planned for it?
        Reply
  • Arun
    Hi Team.
             Its excellent work what you all done. I have one question how to add custom message to this report (ex: Actual result message -- Navigation to xyz page is successful vs Expected result message Navigation to xyz page should be  successful
    Reply
    • admin[Karthiq]
      Arun,
      Due to the asynchronous nature of protractor, we will be able create option for it.
      
      Reply
  • Vijay
    Hey KarthiQ,
    
    Thanks for this report implementation.
    Wanted to check can we have all console.log statements printed into the report generated. This will help us in debugging as well.
    Thanks in advance.
    Reply
    • karthiQ [ admin]
      It doenot matter Vijay,  Protractor works in Asynchronous way so if you write console.logs then those will be printed whether first step of test cases executes or not.
      
      Even it is possible to get console.logs but it is of no use
      Reply
  • vivek
    1.when I use this require('chercher-tech-jasmine-reporter'); in place of (protractor-jasmine2-screenshot-reporter), it showing error like reporter.beforelaunch/AfterLaunch is not a function. if I don't use this ('chercher-tech-jasmine-reporter')… then everything runs successful.
    
    2. And what is the use of Browser:browser,(if I skip this what would be the impact? )
    Conclusion: I am not getting any report like yours :(
    
    Reply
    • karthiQ [ admin]
      Hi Vivek,
      
      Please let us know where you are using Javascript or typescript as well as are youusing this report for Protractor ?
      
      browser option is required for taking screenshots. Please send me the configuration file that you are using, to karthiq.chercher@gmail.com
      Reply
      • vivek
        Please check this. On email its not sending. 
        
        var HtmlScreenshotReporter = require('chercher-tech-jasmine-reporter');
        var reporter = new HtmlScreenshotReporter({
        	 dest: 'C:/Users/vivek.katare/Desktop/protractor report',
        	 filename: 'my-report.html',
        	// dest: 'C:/Users/vivek.katare/eclipse-workspace/Protract/temp/TestResults',
        	   // screenshotOnFail :true,
        		reportName:'Provide Report Name',
        		showSkipped:true,
        	//	browser:browser,
        		showLineChart:true	 
        });
        exports.config = {
          seleniumAddress: 'http://localhost:4444/wd/hub',
          Capabalities:{
        	  'browserName' : 'chrome'	  
          },
        //Setup the report before any tests start
          beforeLaunch: function() {
             return new Promise(function(resolve){
               reporter.beforeLaunch(resolve);
             });
          },
          specs:["C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/AddSpec.js"],
         
        	  suites: {
        	  customerlogin:    ['C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/Firstfile.js',
        		                 'C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/customerLogin.js'],
        	  managerlogin :	['C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/managerLogin.spec.js'] ,
              Calculator   :    ['calc.js'],
              ExcelReading :    ['UtilityExcelRead.js'],
              SendingMail  :    ['Utilitysendmail.js']
          },
           cucumberOpts: {
        	    format:  'pretty',
        	    require: './step_definitions/*.js', // This is where we'll be writing our actual tests
        	  },
        
        jasmineNodeOpts: {
            showColors: true,
            isVerbose: true,
            realtimeFailure: true,
            includeStackTrace: true,
            defaultTimeoutInterval: 30000
          },
          onPrepare: function () {
              browser.manage().window().maximize();
              browser.manage().timeouts().implicitlyWait(5000);
              jasmine.getEnv().addReporter(reporter);
        
            	},
          
        //Close the report after all tests finish
          afterLaunch: function(exitCode) {
             return new Promise(function(resolve){
               reporter.afterLaunch(resolve.bind(this, exitCode));
             });
          }
          
        };
        Reply
        • karthiQ [ admin]
          Hi  Vivek,
          Please do mind that, when you different configuration you got to set the things up for that particular report. You made simple thing as complicated, below s your modified conf file.
          ----------------------
          
          var chercherTechReporter = require('chercher-tech-jasmine-reporter');
          
          exports.config = {
            chromeDriver: 'D:/Eclipse progs/driverserver/chromedriver.exe',
            seleniumServerJar: 'D:/Eclipse progs/jars/selenium-server-standalone-3.11.0.jar',
            // seleniumAddress: 'http://localhost:4444/wd/hub',
            Capabalities:{
          	  'browserName' : 'chrome'	  
            },
            specs:["C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/AddSpec.js"],
           
          	  suites: {
          	  customerlogin:    ['C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/Firstfile.js',
          		                 'C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/customerLogin.js'],
          	  managerlogin :	['C:/Users/vivek.katare/eclipse-workspace/Protract/TestCases/managerLogin.spec.js'] ,
                Calculator   :    ['calc.js'],
                ExcelReading :    ['UtilityExcelRead.js'],
                SendingMail  :    ['Utilitysendmail.js']
            },
             cucumberOpts: {
          	    format:  'pretty',
          	    require: './step_definitions/*.js', // This is where we'll be writing our actual tests
          	  },
          
          jasmineNodeOpts: {
              showColors: true,
              isVerbose: true,
              realtimeFailure: true,
              includeStackTrace: true,
              defaultTimeoutInterval: 30000
            },
            onPrepare: function () {
                browser.manage().window().maximize();
                browser.manage().timeouts().implicitlyWait(5000);
          
                var reporter = new chercherTechReporter({
                  dest: 'C:/Users/vivek.katare/Desktop/protractor report',
                  filename: 'my-report.html',
                 // dest: 'C:/Users/vivek.katare/eclipse-workspace/Protract/temp/TestResults',
                    // screenshotOnFail :true,
                   reportName:'Provide Report Name',
                   showSkipped:true,
                 //	browser:browser,
                   showLineChart:true	 
               });
                jasmine.getEnv().addReporter(reporter);
          
              	},
            
          
            
          };
          
          Reply
  • vivek
    Hello . It is very beautiful  report. But when I run this code. It saying " browser" is not defined.   where I need to define it? if I commented this line. I am not getting neither graphical report nor bar report. I am getting only normal report(jasmine report only)
    Reply
  • Anil
    I have implemented your reporting in my project. I am unable to see the test cases in report.
    
    After the execution is done i am getting below error
    - TypeError: Cannot read property 'toJSON' of undefined
      - TypeError: Cannot read property 'toJSON' of undefined
    
    
    Reply
    • karthiQ [ admin]
      Please let me know the combination of option on report that you are using, 
      Reply
  • Vishnu Ram
    Hi karthiQ, 
    
    This is really fantastic reporting structure. The reporting details is really good like Pie charts, Line charts and test case details.
    
    i used the same configuration in config file which you have mentioned. 
    
    >But when we execute a batch of 2 test cases ( 2 spec files ) < i am getting 2 seperate html reports. Is there any way to have it as a single html report.
    > The html report is created just in the root folder< is there any way to have one common folder and have the report and screenshots folder inside it.
    
    Please help and update.
    
    Once again , this is a very good report and i really enjoy it.
    
    I faced some problems while implementing it, I just used the same config file setting for 
    Reply
    • karthiQ [ admin]
      1. Let us know the combination you are using in your spec file. If you are using parallel run then it would created the reports  based on the number of runs
      2. For Screenshot, next version will have a option to provide path for screenshot and report.
      
      we will release the version before next monday
      Reply
      • In continuation to my previous ques,
        
        I am using the 2 separate .js as spec files , each have one describe block and one it block . The skeleton is as follows,
        
        'use strict';
        describe("sample") => {
        it("sample 1") => {
        });
        });
        
        
        Reply
        • karthiQ [ admin]
          We are sorry Vishnu, we are not able to reproduce the two report for two describe blocks.
          
          More than one report is generated only when you run the execution in Parallel mode.
          
          If possible mail the conf file and spec file with dummy data, we will have a look into it.
          
          mail us : karthiq.chercher@gmail.com
          Reply
  • santosh
    Hello. First of all appreciate your work for developing such nice fancy report which management always looks.
    
    I tried this report in my current project & observe couple of issues. 
    1. I had skipped some of the scripts & ran only one. However in report, all the skipped cases shown as Pass. 
    2. It would be added advantage if we can show which verification pass in report for the Pass case. Suppose I have more than 10 assertions in one case & script fails in any of the assertion then we can at least verify which assertion Pass & which Fails
    Reply
    • karthiQ [ admin]
      Hi Santosh,
      
      Pass expect statement does not provide any meaning full message because of which we have not included it.
      
      
      Please let me know the combination of your skip issue, we can focus on this and will try to solve this weekend
      
      Send me combination over karthiq.chercher@gmail.com
      Reply