0

I am using Qunit and I am newly Qunit to test my internal javascript functions, I want to use it also for some user interactions like testing error message after Jquery validations. Since I dont use HTML pages (I should test them on gsp, which requires a working runtime.) I dont know how to test them. Is it possible to test them on a given host name(like Selenium-tests)?

1 Answer 1

0

Is it really necessary to test your interactions against a real host? You could always use mocks and test only if your error messages are being called properly, without actually contacting any external elements. That's the whole point of unit testing, after all. I personally use SinonJS for that kind of thing. You could also check for other mocking frameworks if you like (e.g. JsMockito).

For more information about mocks and stubs, I'd recommend you to read this article and do a little research about it on Google's testing blog.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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