1

I followed serenity-js guidelines but I don't see Capabilities and Feature tabs in HTML report. Only tests and acceptance criteria are visibles.

json output (maybe an issue with the path ???) :

{
    "id":"test-num-1;test-dosomething",
    "title":"Test something",
    "name":"Test something",
    "context":"chrome",
    "description":"",
    "startTime":1500459935525,
    "duration":5360,
    "testSource":"cucumber",
    "manual":false,
    "result":"SUCCESS",
    "userStory":{
        "id":"test-num-1",
        "path":"test\\e2e\\features\\capability_1\\myFeature1.feature",
        "storyName":"Test number 1",
        "type":"feature"
    },
    "tags":[
        {"name":"chrome","type":"browser"},
        {"name":"Test num 1","type":"feature"}
    ],
    "issues":[],
    "testSteps":[
        (...)
    ],
    "annotatedResult":"SUCCESS"
}

Is there any issue with path "test\e2e\" that prefix "features" path ?

Thanks

S.L.
  • 11
  • 1
  • The issue is with the path : moving file to ../../ give a json path "path":"features\\capability_1\\myfeature1.feature"," and lost tabs are now visible in reporting. – S.L. Jul 19 '17 at 11:03
  • Hi @S.L. I'm having the same issue here, how do you transform the path? Doing ..\\..\\e2e\\blabla or do you move the files themselves? – Jean-Baptiste Jul 27 '17 at 14:24
  • I finally moved protractor conf from /conf to / and moved all tests from e2e to /features like the typical structure you can find on serenity-js site for cucumber test. I think that serenity-js is not very customisable for the moment. – S.L. Jul 28 '17 at 16:06

1 Answers1

0

The process of producing the Serenity BDD HTML reports consists of two phases:

  1. As your test scenarios are executed, Serenity/JS generates .json and .png files under the outputDirectory
  2. After your tests finish, Serenity/JS CLI (a node.js wrapper around the Serenity BDD CLI jar) processes the above files, as well as the Cucumber feature files, to produce the HTML reports

This means that in order to make both Serenity/JS and Serenity/JS CLI use a non-default directory you'd need to:

  • configure the outputDirectory of Serenity/JS
  • specify the source (location of .json reports and screenshots) and destination (target location for the HTML report) parameters to be the same as the outputDirectory for Serenity/JS, and also the features property (location of Cucumber feature files) when invoking Serenity/JS CLI

Hope this helps!

Jan

Jan Molak
  • 4,426
  • 2
  • 36
  • 32