123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Selenium Test Failures - Blindly Don't Debug

By Author: Siyaram Ray
Total Articles: 373

Selenium gives you a chance to computerize testing a web application end-to-end utilizing a genuine internet browser. It's an incredible device for smoke tests, particularly when run occasionally on a nonstop joining server.

Notwithstanding, when a test comes up short, diagnosing the disappointment can be a genuine test. Your testing structure may report a dubious disappointment message, for example, "Expected genuine yet was false". On the off chance that you've selenium training in Bangalore composed custom disappointment message for your statement, you may improve message like "Anticipated that the Save catch would be obvious."

Obviously, at that point next inquiry is, "Well, if the Save catch wasn't unmistakable, at that point what was?" The excruciating, yet very regular, approach to answer this inquiry is to watch the trial and watch the disappointment direct. On the off chance that you don't watch the trial, at that point settling the disappointment turns into an activity in "investigating blind". This is a misuse of a human's opportunity - the test as of now ran and flopped on the persistent coordination server!

Nonetheless, with a bit of tweaking you can influence Selenium to catch PNG-arrange screen captures and spare the program's HTML source. These two curios are useful troubleshooting apparatuses to have when diagnosing a fizzled test. Here's the reason and how:

Catch a Screenshot - Most disappointments can be analyzed by a speedy look at the internet browser; now and then the test was on the wrong page, an approval manages caused a disappointment, or the application out and out exploded with a special case. See the Selenium interface's captureScreenshot() or captureScreenshotToString(String) techniques for subtle elements.

View the Browser's HTML source - Sometimes a page looks remedy, yet has an issue with the basic HTML. All things considered, utilize the Selenium interface's getHtmlSource() strategy and compose the present DOM substance out to a record. This even works for AJAX structures like GWT that progressively construct the UI at runtime.

Adjust your test structure to catch these records at whatever point a test comes up short. Make sure to give those significant names (the test name is a decent begins) and place them in an area that your consistent reconciliation server will catch as assemble curios. At that point when your test falls flat, you'll have your affirmation disappointment message, a stack follow, a screen capture, and a duplicate of the HTML in the program to help analyze the issue. By contributing a tad of time to improve Selenium work in your nonstop joining condition, you'll be substantially more beneficial while troubleshooting a test disappointment.

Note that the base experiments included with Selenium RC for Java (SeleneseTestCase and SeleneseTestBase) incorporate the capacity to catch screen captures on disappointment by means of the ensured isCaptureScreenShotOnFailure() technique, anyway it doesn't catch the program's HTML source. You'll have to adjust or make your own particular to get that usefulness.

Selenium can be tempting in that it prompts a considerable measure of energy rapidly (at first.) The issue comes two, six, or nine months in, when the test comes about as precarious and the essential design is monstrous.

An excessive number of individuals attempt to create test procedures with UI robotization and WebDriver yet neglect to see long haul comes about. As a test specialist, it is a kind of judgment of our part, on the grounds best selenium training institutes in Bangalore that when the undertaking has fizzled, the three to half year test temporary worker is a distant memory.

As such, working with Selenium can be somewhat similar to the dim side of Force. Concentrating on steady and stable test comes about, with a technique around running the tests that incorporates full setup and teardown, can make your venture more like the light side of the power than the dim.

More About the Author

best institute for selenium training in Bangalore – Infocampus. Infocampus is an excellence training center for selenium courses in Bangalore. At Infocampus, selenium training is focused on practical and real time examples. Contact Infocampus at 8884166608 or visit http://infocampus.co.in/best-selenium-testing-training-center-in-bangalore.html for complete details on selenium training.

Total Views: 46Word Count: 636See All articles From Author

Computer Programming Articles

1. Automation Tool - Practices For Implementing Selenium Testing
Author: Siyaram ray

2. Automation Testing Web Browser – Selenium Testing Tool
Author: Siyaram ray

3. The Many Benefits Of Using The Cloud For Legal Practice Management
Author: Ryan Sparrow

4. Benefits Of Using Selenium Testing Tool In Automation Testing
Author: Siyaram ray

5. Learning Techniques For Selenium Webdriver With Java Courses For Testers And Developers
Author: Siyaram ray

6. Being A Star In Your Industry Is A Matter Of Digital, Analytics & Cloud Convergence
Author: Emma J. Watson

7. Custom Software Development Project Management
Author: Chris Kambala

8. Selenium Testing - Python Selenium Webdriver Environment Setup
Author: Siyaram ray

9. Why Should I Use Technology In My Classroom
Author: Charlotte Lancaster

10. Usage Of Javascript With Python Selenium Testing
Author: Siyaram ray

11. Straightforward Tips For Efficient Web Crawling Utilizing Selenium Python
Author: Siyaram ray

12. Advantages Of Cloud Storing Data Through Web Application
Author: Zentryx Tech

13. Incorporating Selenium Into Your Python Automation Project
Author: Siyaram ray

14. Blockchain Help Wit Ico Launch.
Author: Blockchain Help

15. A New Boost In Selenium Automation Testing – Selenium 3.0
Author: Siyaram ray

Login To Account
Login Email:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: