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?

1

1 Answer 1

0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.