Can I test live websites using QUnit? For example, can I write a test that says:
Would QUnit be an appropriate tool for this kind of "live" testing?
You can achieve that using qunit if qunit is the only tool/testing framework that is available for you and the page you will be testing allows GET requests.
How to do that qunit is you can make an ajax call to the page you are testing using JSONP and get the response. Then you would assert certain elements on the response exists.
For google, google itself has a very complex page structure on search results, I would not even attempt to do anything like this.
I would use qunit for testing javascript components on their own without dependencies.
If you are looking for another tool to do this task, I would recommend Selenium, which would do exactly what you want.
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With