I would like to end-to-end test my Meteor/React app in multiple browsers.
Karma is great for automating tests in multiple browsers, but I don't see any config options to make it load the page to test from my own server, only the option to specify which JS files contain tests and support code.
This is obviously because Karma injects its own test harness HTML and JS. But to end-to-end test my page, I would need it to load the page from Meteor instead of Karma's own embedded server, since Meteor injects a lot of its own JS dependencies into the page.
Bundling the tests into the code served up by Meteor is easy. The problem is how to tell Karma to load a specific URL, and to be able to put script tags or whatever to load and run the Karma test harness into my own HTML code.
I believe it may have been possible with the Velocity test runner for Meteor, but I found it horribly slow and wanted to implement end-to-end testing without it.
Does anyone know if this is possible with Karma or another framework?
Aucun commentaire:
Enregistrer un commentaire