Complete Guide to Test Automation by Arnon Axelrod
Author:Arnon Axelrod
Language: eng
Format: epub
ISBN: 9781484238325
Publisher: Apress
2.Add relevant diagnostic information to the test result.
While the tendency of most people is for the first option, I generally prefer to try the second option first, and only if it doesn’t help fall back to debugging. The reason I prefer the second option is that diagnostic information that I add to the test can serve me to investigate future failures as well. In particular, when a test fails during a CI or nightly build and cannot be reproduced on the environment of the automation developer, then debugging won’t help, while diagnostic information would. See the next chapter for more information about investigating failures.
So, the most basic diagnostic information that can help us identify this problem is a screenshot of the page at the moment of the failure. On the one hand, if we see the button in the screenshot, then it means that there’s a problem in the way we try to find it. If, on the other hand, we won’t see the button, then we’ll have to continue investigating further, but the screenshot will probably provide us with more hints regarding the problem. Listings 12-14 and 12-15 show the code we add to SantiyTests.cs and MVCForumClient.cs respectively in order to take the screenshot. Note that most of the code we add to SanityTests.cs is specific to MSTest, but you can do similar things in other unit testing frameworks too.public TestContext TestContext { get; set; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Ada | Ajax |
Assembly Language Programming | Borland Delphi |
C & C++ | C# |
CSS | Compiler Design |
Compilers | DHTML |
Debugging | Delphi |
Fortran | Java |
Lisp | Perl |
Prolog | Python |
RPG | Ruby |
Swift | Visual Basic |
XHTML | XML |
XSL |
Hello! Python by Anthony Briggs(9868)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9758)
The Mikado Method by Ola Ellnestam Daniel Brolund(9748)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8259)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7746)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7742)
Grails in Action by Glen Smith Peter Ledbrook(7668)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7518)
Windows APT Warfare by Sheng-Hao Ma(6505)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6379)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6251)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6122)
Kotlin in Action by Dmitry Jemerov(5020)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4298)
Functional Programming in JavaScript by Mantyla Dan(4019)
Solidity Programming Essentials by Ritesh Modi(3841)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3616)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3569)
The Ultimate iOS Interview Playbook by Avi Tsadok(3534)
