We currently work with ExtJs, and like most frameworks every component has debugging and other methods.
The question I have is one I've seen a few different answers from on random blogs but was wondering if the community could chime in.
Is it more "correct" to test
1) Using Selenium and interacting with it's library so the function is tested from the Dom ... as the user would use it
2) Using the built in ExtJs debugging methods to fire the events.
An example would be a number field with an up and down arrow to increase the number inside. I could
Find the elements of the up and down arrow to press up and down (in this case only really feasible by xpath)
Find the component and use the spinUp() method that is part of the component.
I'd probably will have at least a smoke level tests in selenium because it's not tied to the JS framework / implementation details. In the event you do a framework migration, your selenium tests will still be useful. (but most likely you may end up gutting many of the mappings soon after anyways since usually a framework switch is usually followed by a UI redesign anyways.) As for how many tests to write in ExtJs, I think it's up to your particular need for fast feedback vs being closer to the user. My preference is to do all component level tests in the JS framework. For example, I'm in an Angular shop, we have more comprehensive tests using Jasmine/Karma, and working on getting those to run cross browsers via Selenium Grid (without Selenium). But we also as a formal acceptance criteria have automated tests in Selenium for each story, but not to the level as our Unit tests. We feel this gives is the balance of speed, maintainability, and code coverage we desire. In this setup, our main goal is providing developers feedback as quickly as we can, at the cost of some correctness.
However if you're in a shop where QA is not part of Development, and delivery is part of a formal handoff, you may opt more for the pure blackbox approach (Selenium). Because in that case you're mission instead of focusing on development productivity, you become focused on purely quality and customer experience. In that sort of responsibility matrix, you'll want to be close to customer as possible.
I think it's a challenge we have to balance. I have the fortunate designation of being a 'developer' who specializes in testability. I tend to have to weigh the benefits of shimming in automation hooks (white box) or bending over backwards to write a more pure blackbox test. At times, I will redesign pieces of the software under test to add automation hooks because I feel the speed and maintainability gained is worth the correctness that's lost. One example of this was a recent test I wrote which use JS injection to simulate a drag and drop. In Selenium, the correct way is to use the Actions driver, however using the Actions driver because it controls the mouse on a system level, you cannot run multiple tests on the same machine concurrently. So I decided to use the JS hook in order to better parallelize my tests so the developers could run through all the tests faster and get his feedback instead of waiting for each test to run one at a time.
Last edited by dlai; 03-10-2015 at 08:11 AM.
Go here to file a bug: https://github.com/SeleniumHQ/selenium/issues
We are looking for a automation tool that should support Java applets. We know that QTP Support since its Licensed we are not in the stage to go for QTP.
1: Will Selenium support java applets ?
2: If No is there any plugin to make the selenium to support java applets?
3: What are all the tool that you suggest for automation tool that support java applet.
Please share your comments.
Thanks vinod....Really useful
Originally Posted by vinodfg
Tags for this Thread