2

To be able to test my web service, I need to be logged in.

I've wrote a casperjs test for the login funcionality, but I would like to reuse that in all of my future tests.

Is there a way to modularize the login routine I've already wrote, and have it to run at each test's start function?

4

1 回答 1

0

You can either write a module or extend the casper object.

In a test context, this gist may be useful as well.

于 2013-05-09T15:37:06.697 回答