-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asynchronous execution when a new browser is connected #370
Comments
Yep, your proposal is right. We should decouple the execution, there's already an issue (https://github.com/testacular/testacular/issues/57) for it, so I'm closing this as duplicate. In the meantime, as a workaround, you could let Testacular to start the browsers (a custom launcher to do whatever you want - eg. start it using WebDriver; current master already has support for plugins and I hope we gonna have a WebDriver launcher/plugin soon). Another workaround could be - start Testacular with |
Maybe this issue should be reopened? I'm currently using karma-webdriver-launcher, selenium grid, and ios-driver. Everything is working fairly well, except one thing. The problem is that karma waits to execute tests until all browsers are connected. The reason this is a problem is because there is only one iOS Simulator, and even though ios-driver is capable of using it for multiple targets, it can't use it at the same time. In particular, it is capable of sessions for both iPhone and iPad, but they are meant to be handled successively. The problem arises when I want to test both iPhone and iPad in the simulator. It goes like this:
I can't figure out how to launch ios-driver without it giving both iPhone and iPad as an available browser, but I don't know if this is the right behavior anyway. ios-driver works great with other desktop browsers, and a single ios target. This just happens when running 2 or more simulator targets, and those targets live on the same machine. I initially questioned what this issue was or if it is an issue at all. Maybe it is just the way my grid is set up. But after thinking about it, I really wandered if it was necessary for Karma to work like this? Does it really have to wait for a connection on all browsers before running any tests? Can't it just start the run on the browser that connected, then compile the data of all the runs after all of them have completed? I would think this was the way it would work to run faster and with more parallelism. Maybe this is instead an issue with karma-webdriver-launcher, but I haven't looked at the guts of it thoroughly yet. |
Ok had a look and this is definitely the way Karma works: So I am still wondering as to why? |
In the current behaviour, if Testacular is executing against a browser, and a new browser connects to the server, the latest is put into idle wait, until the running execution finishes. After that the execution is run for all browsers from the beginning.
My proposition is - in such a case, start execution with the new browser immediately, and report for all browsers after that. No need to wait for the first one to finish.
In my CI setup, I'm starting testacular with no browsers, then using WebDriver to start some browsers and connect to Testacular, and when everything is done close all browsers and stop testacular. This execution is slow, because it is executed twice - once for the first browser to connect, and then again for all browsers at once. This could be avoided with this proposition.
Ideally, it would be possible to close a browser that has finished and still get the report for it.
The text was updated successfully, but these errors were encountered: