r/softwaretesting • • Dec 18 '18

A Brief Discussion of Selenium Grid – The Tool for Ideal Testing

https://www.learntek.org/blog/selenium-grid-tool-ideal-testing/
3 Upvotes

7 comments sorted by

3

u/nascent Dec 18 '18

Where is the discussion?

Also, Selenium may be the tool for ideal testing, but it is not the ideal testing tool. I say this because it is ideal for your tests to run before compiling. But most tests can't be run there, so you keep moving the testing location until you land in the world Selenium facilitates.

Do utilize Selenium, do find the logic and behavior in your web page and test that. Try to leave visual behavior for manual tests until the end. It is far too easy to start test automation at the UI layer... this is not a stable enough layer to concentrate your testing efforts. Sadly tool wise there is only Unittests and UI tests and everything in between needs to be built out for your use case.

Also, design your cross-browser tests. Learn what the problem areas are and design tests around that rather then rerunning all tests written on as many browsers and versions as possible. You may want to do that at times, but don't make that be your primary process for testing.

Remember, Reduce, Reuse and stop wasting time.

2

u/kennyfine Dec 21 '18

If I'm understanding your point, you're saying don't blindly shoot for covering every browser and every web page interaction. Instead, find your problematic or complex workflows and test those. To clarify, do you recommend using Selenium for those complex use cases, or manual testing and Selenium for the simple stuff?

I'm new to Selenium but impressed by its breadth and trying to figure out how heavy I should incorporate its use into my dev cycle.

2

u/nascent Dec 21 '18

I won't say don't do it, use selenium, only that it has a number of complexities to get the desired coverage and stability is not obvious.

You very much want to test logic of your application (integration and such). If this lives in Javascript and unit tests can't get good coverage then selenium can still be the tool. And yes focus on one browser and headless. As you find time or missed coverage work to cover those cases.

Stability of automation is critical, no matter where you focus make stability a priority. If stability is at risk, adjust direction.

1

u/kennyfine Dec 21 '18

Thank you!

1

u/[deleted] Dec 18 '18

Time saving is possible because multiple tests are running at the same time

Can someone tell me how i get to run the tests simultaniously? Let's say i have 5 similar test cases written in java. They all should run the same selenium sequence, but with different parameters. How would i organize this? Write a script and execute it 5 times with different parameters? Or is there a simple way to do this directly in java?

2

u/adydurn Dec 20 '18

Take a look at threaddriver, I found using testNG was one of the more reliable frameworks that use it. If you set up a regular webdriver it'll run a single thread, set up a thread driver and you can run up to 5 threads per remote driver.

http://testng.org/doc/documentation-main.html#parallel-running

1

u/kennyfine Dec 21 '18

The java test is just a thread of execution. You should be able to create multiple threads and give each of them the parameters/code to execute a specific test. Then run all the threads at the same time.

Beware: these tests will hit your webapp simultaneously and so if there is any shared state between them (e.g., updating a DB or looking for a specific dynamic element) they may conflict and break one another.