Home Ask Login Register

Developers Planet

Your answer is one click away!

Lars February 2016

Nightwatch XML output file is empty

When I run my test, I get all the output I would expect from the test such as

 ✔ Element <body> was visible after 12 milliseconds.
 ✔ Testing if element <input[id="usernameID"]> is visible.
 ✔ Testing if element <#usernameID> is visible.
 ✔ Testing if element <#passwordID> is visible.
 ✔ Testing if value of <#usernameID> contains: "".

But when I open the XML file that is generated there is nothing there, just the header, footer and a bunch of blank lines.

<?xml version="1.0" encoding="UTF-8" ?>
<testsuites errors="0"

  <testsuite name="loginTests"
    errors="0" failures="0" hostname="" id="" package="login" skipped="0"
    tests="2" time="15.87" timestamp="Mon, 08 Feb 2016 21:01:16 GMT">

    <testcase name="Login Page Load Test" time="10.68" assertions="1">


    <testcase name="Login/Logout Test" time="5.195" assertions="23">



Here is a snippet of the code.

'Login/Logout Test' : function(client) {
   .waitForElementVisible("body", client.globals.waitForConditionTimeout)

I must be missing something simple.


Lars February 2016

Apparently this is the way it is... does not make a lot of sense but...

To get this information out of the test run a custom reporter is used.

I have done this, now I can write the information anywhere I want I chose to write it to a DB table.

Post Status

Asked in February 2016
Viewed 2,323 times
Voted 12
Answered 1 times


Leave an answer

Quote of the day: live life