Skip to content

Building the reporter locally

Ramon Klein edited this page May 2, 2019 · 7 revisions

If you want to modify the reporter you can clone the whole reporter repository locally and than inspect the following...

folders

app

Contains the code the is run during the report generation (during your e2e tests)

lib

Contains the code and html that is executed while viewing the report (angularjs)

tests

If you modify the behavior of the code you might have to adapt the unit tests. The folder tests/app contains the test for lib folder code and the folder tests/reporter contains tests for the app folder code. (Yes you read right)

Building

Before you start anything go into root folder and invoke npm install. If you than modify e.g. files in the app folder you can either npm run tests-reporter to see if the unit-tests still work. But if you really want to test your changes during a real situation you have the following steps:

This has to be done only once

  1. Go to the root folder and invoke `npm link'. This should start a compile run and will make the npm package ready for local installation.
  2. Go to the folder/project where you want to test the changes (you can use the examples subfolder) and invoke npm link protractor-beautiful-reporter. This will install your modified reporter as it would be installed like the real npm package

This has to be done each time you want to use your modified reporter

  1. Modify the code in app folder
  2. Invoke rpm run app:compile
  3. Run you e2e tests with protractor and look at the results
  4. Go to step 1 if you need to make more changes