- Views: 30
- Report Article
- Articles
- Reference & Education
- Teaching
3 important THINGS YOU NEED TO KNOW about selenium
Posted: Sep 07, 2018
1. Page Object Pattern
The page protest design had the greatest effect in making our tests viable. The page question design basically implies that each page knows how to play out the activities inside the page. For instance, the login page knows how to submit client accreditations, tap the "overlooked my secret key" connection, and sign in with Google SSO. By moving this usefulness to a typical spot, it could be shared by the majority of the tests. Since the majority of our tests are composed by various engineers, and inside the item there are a wide range of approaches to play out a similar activity, each designer had diverse methods for playing out precisely the same. A case of this would choose Seleniun Training In Marathahalli a record on Lucidchart's archives page. When moving to page objects, we discovered 6 diverse CSS strings to choose a record and 3 distinctive approaches to choose which one to tap on. On the off chance that this at any point transformed, it would be bad dream to experience and fix it in every one of the 50 or so tests that required tapping on a report. The following is a case of our page question speaking to the records page.
With the page protest display, our testing structure turned out to be significantly more viable and versatile. At the point when a noteworthy component was refreshed, all that must be done to refresh the tests was to refresh the page objects. Designers knew precisely where to look and what to do keeping in mind the end goal to get all tests identified with that component passing. With regards to scaling the test suite, making new situations was as basic as joining the usefulness that is now composed in an alternate way. This turned the undertaking of composing more tests for a specific element from a 2-3 hour errand to a paltry 10 minute assignment.
Make Tests Reliable
False negatives are perhaps the most noticeably bad part about Selenium tests. It makes it hard to run them as a major aspect of a robotized manufacture since no one needs to manage a fizzled assemble that should have passed. At Lucid, this was the main issue we expected to tackle before our Selenium suite could be viewed as important. We added retrying to the majority of our test activities and to a few of our more flaky test suites, yielding much better outcomes.
2. Retry Actions
The most compelling motivation for false negatives in our Selenium test suite was Selenium advancing beyond the program. Selenium would snap to open a board and afterward before the javascript could execute to open the board, Selenium was at that point endeavoring to utilize it. This prompted a considerable measure of exemptions for stale component, component not found, and component not interactive.
On the principal pass, the arrangement was basic: each time we got one of these blunders, basically include a little pause. In the event that despite everything it fizzled, make the hold up longer. While this arrangement worked as a rule, it was not exquisite and prompted a great deal of time leaving the program simply sitting and pausing. Selenium tests are as of now sufficiently moderate without the express pauses.
With an end goal to take care of this issue, we took a gander at a portion of the choices that Selenium makes accessible however we were not able make them work in every one of the circumstances that we required for our application. From these cases, we chose to set up our own surveying framework that would meet our requirements.
With these three strategies, we could lessen our false negatives down to about 2%. The greater part of our strategies default to a maximum hold up time of 1 second and a surveying interim of 50 milliseconds so the deferral is unimportant. In our best case, we could turn a test that was a false negative around 10% of the time and took 45 seconds into a test that delivered no false negatives and just took 33 seconds to run.
3. Suite Retries
Our last exertion in making tests more dependable was setting up suite retry. A suite retry just gets a disappointment and after that begins the test once again starting with no outside help. In the event that the test passes on one of the consequent retries, at that point the test is set apart as passing. On the off chance that the test is truly falling flat, it will bomb each time it is run and still give the disappointment notice.
At Lucid, we have endeavored to utilize suite retries as sparingly as could reasonably be expected. Normal false negatives is an indication of an inadequately composed test. Once in a while it isn't justified regardless of the push to adjust the issues in a test to make it more vigorous. For us, we adhered to a meaningful boundary at tests that depended on outsider reconciliations, for example, picture transferring, SSO, and matching up to Google Drive. There are ways we could improve tests prepared to deal with disappointments from outside reconciliations and modules, however they are not worth the time and push to amend the false negatives that happen now and again. A retry does not settle a test, but rather expels the commotion of false negatives from the reportings.
Mess around with It
When I initially began working with Selenium, I observed it to be extremely excruciating. My tests bombed occasionally for apparently no reason. It was a repetitive push to get each client activity remedy. The tests were redundant and difficult to compose. Furthermore, it was not simply me; different designers over the association all felt along these lines. Selenium had turned into a feared undertaking to be finished begrudgingly toward the finish of another element.
Building up a structure that is solid, viable, and adaptable was basically the initial phase in making an awesome Selenium testing suite at Lucid. From that point forward we have included some extremely fascinating and astounding tests. One engineer planned an approach to take a screen capture of our primary illustration canvas and store it in Amazon's S3 benefit. This was then coordinated with a screen capture examination device to do picture correlation tests. Another fun test suite centers around cooperation on archives. It is compensating to see tests that take a few clients and utilize visit and constant joint effort to assemble a vast archive. Other noteworthy tests incorporate our reconciliations with Google Drive, Yahoo and Google SSO, IconFinder, Google Analytics, and some more.
With our Selenium test suite, we currently get a few relapses each week amid improvement. Of our test outcomes, under 1% are false negatives. We have seen incredible achievement in scaling, refreshing, and keeping up our test suite over the previous months as we have executed a portion of these means. The test suite is developing each day and with each passing week it is winding up increasingly profitable in helping us to give the most elevated quality programming to every one of our clients.
Author
Best Institute for selenium training is Infocampus. At Infocampus, candidates will be getting practical oriented Seleniun Training In Marathahalli. Live projects with real time examples are available at Infocampus.
For complete details, Visit: http://infocampus.co.in/best-selenium-testing-training-center-in-bangalore.html To attend free demo class on selenium automation testing, Contact: 08884166608 / 08792462607
The Best Training Institute in Bangalore for IT course is Infocampus. We offer courses on Web designing, JAVA, iOS, Digital Marketing, Software development and so on. Highly Talented With 8+ Years Experienced Mentors.100% Job Assistance.