O'Reilly logo

Using Node.js for UI Testing by Pedro Teixeira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Debugging

This chapter shows how you can use the browser object to inspect some internal states of your application.

Topics covered in this chapter include:

  • Enabling the debugging output
  • Dumping the browser state

By default, Zombie does not output the internal events to the console, but you can run Zombie with the DEBUG environment variable set to true. If you have a UNIX shell command line, you can prefix the launching of your test suite with DEBUG=true, shown as follows:

$ DEBUG=true node_modules/.bin/mocha test/todos

If you are running Windows, you can set and unset the DEBUG environment variable shown as follows:

$ SET DEBUG=true
$ SET DEBUG=

By enabling this environment variable, Zombie will output every HTTP request that it makes, along ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required