In the event that you are in the matter of making Quality Software, consistently can hurl an amazement or two. How one beats these everyday difficulties regularly characterizes the course of your prosperity. Here's one such test we as of late confronted, we thought of offering to you. We would love to hear your criticism.
Like any great adesigner, we tend to regard breaking in reverse similarity as a wrongdoing and endeavor to shield our end-clients from confronting any outcomes coming about because of surprising changes. All things considered, we experience a daily reality such that change is the main steady! It's dependably a test to ingest the progressions.
For our Scriptless Test Automation stage, we utilize Selenium WebDriver to communicate with the Browsers. We by and large utilize a steady form of Selenium webdriver as a standard for our own particular improvement. In any case, we wind up supporting various variants and mixes of bolstered programs/OS blends, as our clients request it. Amid the relapse period of a specific item refresh discharge, our QA group detailed an issue that all the mouse activities (MouseHover, MouseUp, MouseDown) were not working with the Selenium WebDriver variant 3.6+
We explored the issue and assumed that inside mouse activities (in the Qualitia Engine code), we utilize Locatable APIs. We found that these Locatable API had been refactored (and in addition belittled) by Selenium people group in SE 3.6+ and the group prescribed to utilize Actions API which they upheld since SE 3.0+.
In spite of the fact that the test, from this time forward, would have been keeping up in reverse similarity with Selenium forms in Qualitia (at any rate post SE 3.0), any of the above changes would be straightforward on the off chance that we couldn't have cared less about in reverse similarity. Yet, at that point in a perfect world we have clients utilizing different Selenium 3.x forms. We had no alternative yet to settle this issue in Qualitia 5.0 of every a way which works over all the Selenium 3.x forms.
We likewise made sense of that Locatable is a crude method for getting to mouse activities so the group was compelled to move to Actions API and consequently, they couldn't have cared less refactoring them. This basically caused breaking changes. In the wake of conceptualizing, we could think of a couple of methodologies as answers for this issue:
Potential Solution 1: The seemiingly clear arrangement was to supplant Locatable bundle proclamations with new bundle structure articulations (which SE 3.6 had presented) and assemble the code with Selenium 3.6. The code would have effectively aggregated. Notwithstanding, it would have tossed runtime special case for those mouse activities (MouseHover, MouseUp, MouseDown). This would occur since Java wouldn't discover the bundle structure in prior renditions, which is implied for SE 3.6. We dropped this arrangement.
Potential Solution 2: Use Locatable APIs and compose code to deal with Mouse activities in Selenium form in a skeptic way. The thought was, if mouse activities fizzle at runtime (because of startling bundle import) get that Exception (which implies client must utilize pre-SE 3.6 variant) and expressly call the Pre SE 3.6 bundle structure (i.e. more established completely qualified Locatable bundle to summon Mouse activities on Pre SE 3.6).
The pseudo code would look something as takes after:
attempt
/SE 3.6 taking care of
Locatable driver = (Locatable) webDriver;
Mouse = driver.getMouse();
mouse.click(getCoordinates());
catch(RunTimeException e)
/Pre-SE 3.6-taking care of
com.newstructure.Locatable = (com.newstructure.Locatable) webDriver
Mouse = driver.getMouse();
mouse.click(getCoordinates());
This Selenium adaptation particular exemption based code and utilizing expostulated Locatable didn't appear to be perfect and promising way. Making Selenium variant suppositions for the run-time special case can transform whenever into a fiasco.
Potential Solution 3: Use Actions API and change the whole execution while keeping up the regressive similarity. Since Actions API is bolstered post 3.0+, it would be exceptionally protected to utilize them. In addition, SE people group additionally prescribes to utilize them over crude method for utilizing Locatable mouse activity. We likewise accomplish in reverse equivalence. There would be no effect to the Qualitia client, since for her, in her scriptless Qualitia steps, mouse activity name and parameters would continue as before. (Albeit, in fact talking, the parameters would get overlooked in the most recent API, however that won't break anything for the client.)
We chose to go for Solution 3. For the Qualitia User, nothing changes as we chose to live with alternatively tolerating the parameters, which are not utilized by the API. The old experiments will keep on functioning with no effect. The Qualitia client would happily be uninformed of the progressions occurring in the engine!
With help from its dynamic group and the always advancing scene of program based advancements, Selenium will keep on evolving! It's likewise expected that every so often we need to confront breaking changes. We should endeavor to keep our code however much future-confirmation as could be expected and keep up in reverse similarity, at the same time.
Like any great adesigner, we tend to regard breaking in reverse similarity as a wrongdoing and endeavor to shield our end-clients from confronting any outcomes coming about because of surprising changes. All things considered, we experience a daily reality such that change is the main steady! It's dependably a test to ingest the progressions.
For our Scriptless Test Automation stage, we utilize Selenium WebDriver to communicate with the Browsers. We by and large utilize a steady form of Selenium webdriver as a standard for our own particular improvement. In any case, we wind up supporting various variants and mixes of bolstered programs/OS blends, as our clients request it. Amid the relapse period of a specific item refresh discharge, our QA group detailed an issue that all the mouse activities (MouseHover, MouseUp, MouseDown) were not working with the Selenium WebDriver variant 3.6+
We explored the issue and assumed that inside mouse activities (in the Qualitia Engine code), we utilize Locatable APIs. We found that these Locatable API had been refactored (and in addition belittled) by Selenium people group in SE 3.6+ and the group prescribed to utilize Actions API which they upheld since SE 3.0+.
In spite of the fact that the test, from this time forward, would have been keeping up in reverse similarity with Selenium forms in Qualitia (at any rate post SE 3.0), any of the above changes would be straightforward on the off chance that we couldn't have cared less about in reverse similarity. Yet, at that point in a perfect world we have clients utilizing different Selenium 3.x forms. We had no alternative yet to settle this issue in Qualitia 5.0 of every a way which works over all the Selenium 3.x forms.
We likewise made sense of that Locatable is a crude method for getting to mouse activities so the group was compelled to move to Actions API and consequently, they couldn't have cared less refactoring them. This basically caused breaking changes. In the wake of conceptualizing, we could think of a couple of methodologies as answers for this issue:
Potential Solution 1: The seemiingly clear arrangement was to supplant Locatable bundle proclamations with new bundle structure articulations (which SE 3.6 had presented) and assemble the code with Selenium 3.6. The code would have effectively aggregated. Notwithstanding, it would have tossed runtime special case for those mouse activities (MouseHover, MouseUp, MouseDown). This would occur since Java wouldn't discover the bundle structure in prior renditions, which is implied for SE 3.6. We dropped this arrangement.
Potential Solution 2: Use Locatable APIs and compose code to deal with Mouse activities in Selenium form in a skeptic way. The thought was, if mouse activities fizzle at runtime (because of startling bundle import) get that Exception (which implies client must utilize pre-SE 3.6 variant) and expressly call the Pre SE 3.6 bundle structure (i.e. more established completely qualified Locatable bundle to summon Mouse activities on Pre SE 3.6).
The pseudo code would look something as takes after:
attempt
/SE 3.6 taking care of
Locatable driver = (Locatable) webDriver;
Mouse = driver.getMouse();
mouse.click(getCoordinates());
catch(RunTimeException e)
/Pre-SE 3.6-taking care of
com.newstructure.Locatable = (com.newstructure.Locatable) webDriver
Mouse = driver.getMouse();
mouse.click(getCoordinates());
This Selenium adaptation particular exemption based code and utilizing expostulated Locatable didn't appear to be perfect and promising way. Making Selenium variant suppositions for the run-time special case can transform whenever into a fiasco.
Potential Solution 3: Use Actions API and change the whole execution while keeping up the regressive similarity. Since Actions API is bolstered post 3.0+, it would be exceptionally protected to utilize them. In addition, SE people group additionally prescribes to utilize them over crude method for utilizing Locatable mouse activity. We likewise accomplish in reverse equivalence. There would be no effect to the Qualitia client, since for her, in her scriptless Qualitia steps, mouse activity name and parameters would continue as before. (Albeit, in fact talking, the parameters would get overlooked in the most recent API, however that won't break anything for the client.)
We chose to go for Solution 3. For the Qualitia User, nothing changes as we chose to live with alternatively tolerating the parameters, which are not utilized by the API. The old experiments will keep on functioning with no effect. The Qualitia client would happily be uninformed of the progressions occurring in the engine!
With help from its dynamic group and the always advancing scene of program based advancements, Selenium will keep on evolving! It's likewise expected that every so often we need to confront breaking changes. We should endeavor to keep our code however much future-confirmation as could be expected and keep up in reverse similarity, at the same time.
No comments:
Post a Comment