Sorry, but I did not find anything in the docs. Is it not possible to test local files? Like testContent.html?
Hi! TestCafe requires page to be served via HTTP(S) protocol. However, you can easily serve static pages by using packages like static-server
Ahh, okay, thanks. Maybe you could add a short "how to" to the docs?
@lukasoppermann Sure, we have Recipes section for such things. Feel free to contribute or if your're busy we'll take care of it. Meanwhile, I'll convert this issue into documentation feature request.
Thanks, I am not 100% how to do it, I would be better suited to read the recipe than to write it. 馃槈
@lukasoppermann No problem, we'll do it 馃槂 cc @VasilyStrelyaev
@lukasoppermann I run testcafe on local files using http-server as a simple server and concurrently to run both processes together and kill the server before exiting.
concurrently -r -k "http-server" "http-server ./dist -p 4000 -s" "testcafe chrome ./test/acceptance/**"
@renancouto Great solution, thanks!
@AlexanderMoskovkin created a PR for that if you like: https://github.com/DevExpress/testcafe/pull/970
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.
Most helpful comment
@lukasoppermann I run testcafe on local files using http-server as a simple server and concurrently to run both processes together and kill the server before exiting.