Dan Cuellar discusses strategies for writing automated tests that are robust and maintainable in the face changing codebases and features. These include separating logical test actions from direct controller calls, centralizing site elements and logic, adding self-testing capabilities, consolidating product actions into abstracted libraries, and creating platform-agnostic test scripts. The goal is to design tests that can adapt easily without extensive rework when underlying systems evolve rapidly.
Slides cover how to get started testing your web application. Technologies and concepts explained:
- Unit tests (mocha, jasmine, karma)
- System tests (Selenium)
- Code coverage (istanbul)
- CI servers
Slides cover how to get started testing your web application. Technologies and concepts explained:
- Unit tests (mocha, jasmine, karma)
- System tests (Selenium)
- Code coverage (istanbul)
- CI servers
How to Build Your Own Test Automation Framework?Dmitry Buzdin
Even though there are plenty of open source tools on the market every company needs to put them together and create a test automation framework on top. Best practices of doing that are quite well-known in industry and it is important to learn them before building your own framework. We will go through the core building blocks of test automation frameworks and how they are playing together. You will learn how to assemble your test automation toolchain out of open source libraries and how to integrate them together. The session will be heavily biased towards Java platform.
SoapUI Pro Plugin Workshop #SoapUIPluginsSmartBear
Ole Lensmar, CTO of SmartBear Software, explains how to develop your own plugins for SoapUI Pro, the world's most popular API testing tool. #SoapUIPlugins
Sauce Labs hosted a Selenium bootcamp webinar with guest speaker Dave Haeffner. This presentation will give you a basis for the detail given in Dave's like titled E-book and get you started with Selenium.
Selenium Best Practices with Jason HugginsSauce Labs
Selenium creator and Sauce Labs co-founder Jason Huggins recently gave a great presentation on 'Selenium Best Practices' to the San Francisco Selenium Meetup Group. Visit http://saucelabs.com.blog to see the presentation in its entirety.
Practical Tips & Tricks for Selenium Test AutomationSauce Labs
Have unanswered Selenium questions? Want to learn how to use Selenium like a Pro? Join Dave Haeffner - author of The Selenium Guidebook - as he steps through the best and most useful tips & tricks from his weekly Selenium tip newsletter (Elemental Selenium).
A method of communicating between two devices
A software function provided at a network address over the web with the service always on
It has an interface described in a machine-processable format
http://www.qualitestgroup.com/
Refactoring Legacy Web Forms for Test AutomationStephen Fuqua
THE CHALLENGE:
Given you understand the value of test automation.
Given you are handed a legacy application to maintain and enhance
Given the application is in ASP.Net Web Forms
When you try to add tests
Then you find that test-driven development is literally impossible.
DSL, Page Object and Selenium – a way to reliable functional testsMikalai Alimenkou
Presentation from first Selenium conference in Europe - Selenium Camp (http://seleniumcamp.com) about different test design approaches to make functional tests on Selenium more flexible, reliable and stable.
Covering below modules
1. How to create TestSuite
2. How to create TestCases
3. How to create TestSteps
4. What are the TestSteps
5. Assertions
6. Validation and Verifications
This is a presentation I did back in 2006 about using Selenium and Grinder. Looking at it today (2011) it doesn't focus enough on the Selenium Grinder intersection....
Want to learn how to use Selenium from the ground up? This presentation will show you how to start from nothing and build out a well factored, maintainable, resilient, and parallelized set of tests that will run locally, on a Continuous Integration server, and in the cloud. These tests will not only work well, but exercise relevant functionality that matters to the business.
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Applitools
Written and presented by Fernando Martin.
Automated End-to End-Testing is a two-edged sword; it can be the hero, saving you time during regression testing and preventing faulty releases, or it can be the villain, slowing down the development and release process with flaky, hard to maintain and time-consuming suites that you don't trust or want.
Test automation expert and leading software developer Fernando Martin have seen both. In this talk, he will go through key lessons he learnt, and how he applied them to open source AugmentedDriver - a tool that allowed his team to run more than 80,000 tests in a month, running suites of more than 275 tests in less than 15 minutes.
Watch this in-depth webinar, and learn how to:
Lesson 1: Achieve Throughput: UI tests are inherently slow. Learn how to focus on Parallelism to achieve throughput.
Lesson 2: Achieve Reliability: Learn how to avoid common flakiness pitfalls that make tests unreliable.
Lesson 3: Achieve Modularity and Re-usability: Learn how to architect your framework so it can be easily extended and it can quickly adapt to changes.
Lesson 4: Achieve Encapsulation of Business Logic: Learn how to effectively combine all the previous lessons to make your tests sturdy and readable.
Lesson 5: Achieve Visibility and Transparency: Reporting; consolidating each piece of your framework into something that can be easily understood and digested by the rest of your team.
Lesson 6: Integration and Easy Configuration: Provide easy configuration so the suites can be run effortless by the rest of your team and can be plugged into your CI Systems.
Practical Tips & Tricks for Selenium Test Automation - Dave HaeffnerApplitools
Must-see webinar for Test Automation Experts & Selenium Users!
Join Dave Haeffner - author of The Selenium Guidebook - as he steps through the best and most useful tips & tricks from his weekly Selenium tip newsletter (https://elementalselenium.com).
This talk was given at "Easy Automation in Python" meetup (https://www.meetup.com/Test-Fanatic-MeetUp/events/236481850/).
The talk is about some easy approaches in building web ui automation in python.
As an "easy tool" the selene library is uses.
src code for the talk: https://github.com/yashaka/talks/tree/master/easy-automation-py
A practical approach for end-to-end test automation is discussed. The approach is based on model-based testing. The presentation discusses several industrial case studies of applying model-based testing to automatically generate innumerable number of ready-to-run, executable test cases.
How to Build Your Own Test Automation Framework?Dmitry Buzdin
Even though there are plenty of open source tools on the market every company needs to put them together and create a test automation framework on top. Best practices of doing that are quite well-known in industry and it is important to learn them before building your own framework. We will go through the core building blocks of test automation frameworks and how they are playing together. You will learn how to assemble your test automation toolchain out of open source libraries and how to integrate them together. The session will be heavily biased towards Java platform.
SoapUI Pro Plugin Workshop #SoapUIPluginsSmartBear
Ole Lensmar, CTO of SmartBear Software, explains how to develop your own plugins for SoapUI Pro, the world's most popular API testing tool. #SoapUIPlugins
Sauce Labs hosted a Selenium bootcamp webinar with guest speaker Dave Haeffner. This presentation will give you a basis for the detail given in Dave's like titled E-book and get you started with Selenium.
Selenium Best Practices with Jason HugginsSauce Labs
Selenium creator and Sauce Labs co-founder Jason Huggins recently gave a great presentation on 'Selenium Best Practices' to the San Francisco Selenium Meetup Group. Visit http://saucelabs.com.blog to see the presentation in its entirety.
Practical Tips & Tricks for Selenium Test AutomationSauce Labs
Have unanswered Selenium questions? Want to learn how to use Selenium like a Pro? Join Dave Haeffner - author of The Selenium Guidebook - as he steps through the best and most useful tips & tricks from his weekly Selenium tip newsletter (Elemental Selenium).
A method of communicating between two devices
A software function provided at a network address over the web with the service always on
It has an interface described in a machine-processable format
http://www.qualitestgroup.com/
Refactoring Legacy Web Forms for Test AutomationStephen Fuqua
THE CHALLENGE:
Given you understand the value of test automation.
Given you are handed a legacy application to maintain and enhance
Given the application is in ASP.Net Web Forms
When you try to add tests
Then you find that test-driven development is literally impossible.
DSL, Page Object and Selenium – a way to reliable functional testsMikalai Alimenkou
Presentation from first Selenium conference in Europe - Selenium Camp (http://seleniumcamp.com) about different test design approaches to make functional tests on Selenium more flexible, reliable and stable.
Covering below modules
1. How to create TestSuite
2. How to create TestCases
3. How to create TestSteps
4. What are the TestSteps
5. Assertions
6. Validation and Verifications
This is a presentation I did back in 2006 about using Selenium and Grinder. Looking at it today (2011) it doesn't focus enough on the Selenium Grinder intersection....
Want to learn how to use Selenium from the ground up? This presentation will show you how to start from nothing and build out a well factored, maintainable, resilient, and parallelized set of tests that will run locally, on a Continuous Integration server, and in the cloud. These tests will not only work well, but exercise relevant functionality that matters to the business.
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Applitools
Written and presented by Fernando Martin.
Automated End-to End-Testing is a two-edged sword; it can be the hero, saving you time during regression testing and preventing faulty releases, or it can be the villain, slowing down the development and release process with flaky, hard to maintain and time-consuming suites that you don't trust or want.
Test automation expert and leading software developer Fernando Martin have seen both. In this talk, he will go through key lessons he learnt, and how he applied them to open source AugmentedDriver - a tool that allowed his team to run more than 80,000 tests in a month, running suites of more than 275 tests in less than 15 minutes.
Watch this in-depth webinar, and learn how to:
Lesson 1: Achieve Throughput: UI tests are inherently slow. Learn how to focus on Parallelism to achieve throughput.
Lesson 2: Achieve Reliability: Learn how to avoid common flakiness pitfalls that make tests unreliable.
Lesson 3: Achieve Modularity and Re-usability: Learn how to architect your framework so it can be easily extended and it can quickly adapt to changes.
Lesson 4: Achieve Encapsulation of Business Logic: Learn how to effectively combine all the previous lessons to make your tests sturdy and readable.
Lesson 5: Achieve Visibility and Transparency: Reporting; consolidating each piece of your framework into something that can be easily understood and digested by the rest of your team.
Lesson 6: Integration and Easy Configuration: Provide easy configuration so the suites can be run effortless by the rest of your team and can be plugged into your CI Systems.
Practical Tips & Tricks for Selenium Test Automation - Dave HaeffnerApplitools
Must-see webinar for Test Automation Experts & Selenium Users!
Join Dave Haeffner - author of The Selenium Guidebook - as he steps through the best and most useful tips & tricks from his weekly Selenium tip newsletter (https://elementalselenium.com).
This talk was given at "Easy Automation in Python" meetup (https://www.meetup.com/Test-Fanatic-MeetUp/events/236481850/).
The talk is about some easy approaches in building web ui automation in python.
As an "easy tool" the selene library is uses.
src code for the talk: https://github.com/yashaka/talks/tree/master/easy-automation-py
A practical approach for end-to-end test automation is discussed. The approach is based on model-based testing. The presentation discusses several industrial case studies of applying model-based testing to automatically generate innumerable number of ready-to-run, executable test cases.
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationIosif Itkin
TMPA-2017: Tools and Methods of Program Analysis
3-4 March, 2017, Hotel Holiday Inn Moscow Vinogradovo, Moscow
A Survey on Model-Based Testing Tools for Test Case Generation
Wenbin Li, Franck Le Gall, Naum Spaseski, Easy Global Market
For video follow the link: https://youtu.be/Q5wvOX5cdrM
Would like to know more?
Visit our website:
www.tmpaconf.org
www.exactprosystems.com/events/tmpa
Follow us:
https://www.linkedin.com/company/exactpro-systems-llc?trk=biz-companies-cym
https://twitter.com/exactpro
Ho Chi Minh City Software Testing Conference January 2015
Software Testing in the Agile World
Website: www.hcmc-stc.org
Author: Tho Thanh Quang
As testing is increasingly incurring a substantial cost in software development, there are many attempts made to automate the testing process. One notable approach is automatic generation of test cases. Recent research has suggested generating test cases from UML-based diagrams, which are over-formal to be applied effectively in industry. In this talk we introduce a framework, known as FATS (Framework for Automated Testing Scenarios), to counter this problem. In FATS, we suggest representing user-defined use-cases by a markup language, therefore activity graphs and test scenarios can be developed accordingly in an automatic manner.
Van Wilson
Senior Consultant with Cardinal Solutions
Find more by Van Wilson: https://speakerdeck.com/vjwilson
All Things Open
October 26-27, 2016
Raleigh, North Carolina
In this webinar, Dave Haeffner (Elemental Selenium, USA) discusses how to:
- Build an integrated feedback loop to automate test runs and find issues fast
- Setup your own infrastructure or connect to a cloud provider
-Dramatically improve test times with parallelization
https://huddle.eurostarsoftwaretesting.com/resource/webinar/use-selenium-successfully/
Unmesh Gundecha delivered a session on "Selenium Powertools" at #SeleniumSummit21
Technology focused IT professional offering vast experience leveraging Software Engineering, Agile Software Development, Test Automation & DevOps methodologies to deliver highly effective and creative solutions to business and technology challenges. Utilizes highly attuned analytical skills to develop IT and business strategies employing leading/cutting-edge technologies to increase productivity & efficiency and organised with a strong capacity to prioritize workload, delegation, and steer project completion with established deadlines. Experience in building and leading small to a large specialist team on critical project deliveries. Passionate about Technology, Automation, UI/UX and Design.
To know more about #SeleniumSummit21 please check : https://seleniumsummit21.agiletestingalliance.org/
JavaScript has a well deserved reputation of be hard to write and debug. Put it on a mobile device and the problems increase exponentially. Mobile browsers lack all of the niceties that developers rely on to do testing and debugging including the most fundamental tool, the debugger. But it is possible to write quality JavaScript on a mobile device without relying on blind luck. In this talk I will show all of the tools and tricks that I learned in my 12 month development of the new KBB.com mobile site.
JLove - Replicating production on your laptop using the magic of containersGrace Jansen
Containers are an amazing technology that are revolutionising how we deploy and create applications. Docker and Kubernetes are helping developers and organisations realise the magical potential that container technology and orchestration offer. Enter MicroShed and the Testcontainers framework enabling local test automation that leverages that magical portability containers offer. In this session we'll explore how Testcontainers can help you run and test with true-to-production environments in development with minimal re-writing of your test code.
A super enjoyable and entertaining walk through API memory lane, then a primer on how to test API's from a unit, integration, and monitoring standpoint. Then a demo on a CI/CD implementation I created at Snagajob.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
2. TERMINOLOGY
Test or Automation Script
a series of steps and expected output
Hook or Element
a means of identifying a piece of UI (think the By class in
WebDriver)
Controller
a program which executes basic commands (think WebDriver or
SeleniumRC Server)
3. PHILOSOPHY
• Selenium is a controller program, it exists to perform actions
on a platform (web browsers)
• Click a link
• Read some text
• Libraries exist to coordinate these small actions into larger
logical actions on a particular platform
• Sign In
• Send A Message
• Get All Error Messages
• Interfaces exist to remove the platform from the context of
libraries
• Automation scripts should coordinate the highest level of
abstraction whenever possible to maintain agility and
robustness
4. A BIT ABOUT ZOOSK
• Zoosk is a romantic social network with tens of millions of users that
operates in 25 languages and in over 70 countries.
• Products include:
• web site
• mobile web site
• Facebook app
• iPhone app
• iPad app
• Android app
• Adobe Air app
• The development pace is rapid, features are churned out in around 2
weeks time (including testing)
• Product management is always running experiments and adjusting
plans based on data from instrumentation
• Developer to quality assurance ratio hovers somewhere around 10:1
5. SO WHAT DO YOU
MEAN BY JELL-O®
Jell-O [jel-oh]
Site wide A/B tests where ½ of users will see a complete site
redesign and the other ½ will use the site as it was before.
Facebook app users can also split between different A and B
designs at times.
Each A & B may have its own JS, CSS, and business logic to go
along with it.
Not to mention that different versions of the API were being used
by the web, Facebook app, and mobile apps.
All the while, different features were being enabled and disabled
for different subsets of the A/B test groups
6.
7.
8. WHAT CAN GO WRONG?
• General
• Not enough information is retrieved to reproduce the failure
• Elements
• The type can change (e.g. dropdown becomes a checkbox)
• An element can change location
• An element can have multiple ways of identifying itself depending
on an A/B test
• Business Logic
• Logic can change for one platform
• Logic can change for some users and not others (A/B test)
• Logic can change for all platforms
9. HOW DO WE COMBAT THESE
PROBLEMS?
• General
• Not enough information is retrieved to reproduce the failure
• Separate test actions from controller code, add abundant
logging, and unify the patterns by which common
operations are accomplished (e.g. selecting from
dropdown) Don’t access selenium directly in any scripts.
Create a wrapper that logs everything and performs basic
checks. (e.g. is the choice available on the dropdown)
• If libraries are used then you can log just about everything
possible every time without having to re-paste all the
logging code
10. HOW DO WE COMBAT THESE
PROBLEMS? (CONT.)
• Elements
• The type can change
• Abstracting away all uses of the item into a library
• An element can change location
• Centralize all hooks into the UI, you can change it once
and it will be fixed for all
• Using reflection, you can verify that all of your hooks are
functional
• An element can have multiple ways of identifying itself
depending on an A/B test
• ID’s are great, but you can also use an XPath Or
expression in your centralized hook
11. HOW DO WE COMBAT THESE
PROBLEMS? (CONT.)
• Business Logic
• Logic can change for one platform
• Update the library for that platform
• Logic can change for some users and not others (A/B test)
• Detect the A/B test in the library
• Logic can change for all platforms
• Generic Libraries or test scripts which coordinate platform
specific libraries are a great place to address this
12. HOW DO YOU DEAL
WITH THAT AGAIN?
• Separate logical actions From calls to controller (in this case
Selenium) code into libraries
• Centralize your site model and logic, so that all automation
runs through one place. When you have to fix something, you
can fix it once for everything.
• Write code that can test the test automation. Investigating test
script failures can be costly, but if you test code can test itself
you will be able to pick out certain kinds of problems easily.
• Write platform-agnostic test scripts when possible. This leaves
you with one copy of site-logic and test-logic for all platforms.
When things change, you’ll be happy its in one place.
13. SEPARATION OF CONTROL
FROM SCRIPTING
• An extra layer is great to log information and perform additional
actions that Selenium can’t assume it needs to do
• We use a layer between that wraps logging, error
handling, and some other things on top of most WebDriver
commands
Test Script •IsSignedIn()
•Log(“Retrieving Cookie Auth”);
Action •var authCookie = GetCookie(auth);
•Log(authCookie);
Library •return authCookie != null;
•Log (“Getting Cookies”);
•var c = Driver.Manage.().Cookies;
WebDriver •Log(c);
•var a = Driver.Manage().Cookies[“auth”];
Wrapper •Log(“Cookie value: “ + a.ToString());
return a;
14. CENTRALIZING YOUR SITE
MODEL FOR SELF -TESTING
• All hooks (means by which we retrieve WebElements) are stored
in a single class, namespace, or something similar
• Elements are stored lazily; the means to retrieve them are
stored, but the actual WebElement is not retrieved until run-time.
We use classes that wrap calls to By or methods which will return
a WebElements
• Hooks are grouped relevantly and each group has private self-test
setup methods which will navigate the client (e.g. selenium) to
where the hooks exist
• Reflection is used to iterate through all of these groups and run
the private self-test setup methods and then validate the
functionality of the elements
• Annotations (Java) or Attributes (C#) are used to exclude
elements from the tests
15. ABOUT INTROSPECTION
& REFLECTION
Introspection (Java) and Reflection (C#) is the process by which a
computer program can observe, do type introspection, and modify
its own structure and behavior at runtime.
In the example to follow we store information about how to use
various hooks (references to pieces of user interface) in the code
so that later at runtime we can use the information to determine
how to test our library of hooks.
16. CENTRALIZED HOOKS
[C#]
namespace Automation.Hooks.Web
{
public static class LoginPage
{
public static WebHook EmailField = By.Id(“email”);
public static WebHook PasswordField = By.Id(“password”);
public static WebHook SubmitButton = By.Id(“submit”);
[OmitFromSelfTest]
public static WebHook Spinner = By.Xpath(“//div[@class=’wait’]”);
private static void _StartSelfTest()
{
_SelfTestSeleniumInterface.Open(“http://www.zoosk.com”)
}
}
}
17. SIMPLE SELF-TEST
[PseudoCode]
// iterate in depth-first-search order
foreach(class c in Automation.Hooks.Web)
{
if c.hasMethod(“StartSelfTest”)
c.executeMethod(“StartSelfTest”);
foreach(WebHook h in c)
Log.Verify(IsElementPresent(h));
if c.hasMethod(“StopSelfTest”)
c.executeMethod(“StopSelfTest”);
}
18. MORE ADVANCED
TECHNIQUES
• Subclass WebHook to things like TextBoxHook and have the
test check for reading and writing from the text field using
Selenium
• Do the same for Links, Images, etc. and write custom test
methods
• Randomize the order of which elements are tested to check for
robustness
• Add random data to the tests, e.g. type a random string into
the text box.
• Write custom test methods for structures that require it
19. CONSOLIDATING AND ABSTRACTING
PRODUCT LEVEL ACTIONS
• Product Level Actions (e.g. Sign In To The Site) are stored in
libraries, so that there exists one good copy that everyone can
use
• The libraries implement generic interfaces so the platform can
be abstracted away (i.e. the native iPhone app and the website
both have libraries with a signup function that conforms to an
interface that can be used in any test script)
• If the process changes for a particular platform, you can
update it in a single place
• If the process change across all platforms, you can use
platform agnostic (generic) libraries and update the logic in a
single place
20. ABSTRACT LIBRARIES
[C#]
namespace Automation.Libraries
{
public SeleniumActionLibrary WebSignUpLib : ISignUpLib
{
public void SignIn(string email, string password)
{
if (IsSignedIn())
return;
if (!Driver.Url.contains(“login.php”);
Driver.Navigate().GoToUrl(“https://www.zoosk.com/login.php”);
Hooks.Web.LoginPage.EmailField.type(email);
Hooks.Web.LoginPage.PasswordField.type(password);
Hooks.Web.LoginPage.SubmitButton.click();
WaitForElementToNotExist(Hooks.Web.LoginPage.Spinner);
}
}
}
22. PLATFORM AGNOSTIC
AUTOMATION SCRIPTS
• Many tests that need to be run are logically identical
across all platforms.
• Deactivate an account, attempt to sign in, expect failure
• Send a message, verify it shows up in sent items
• Take down some web service, verify an error is produced
• Implemented these tests at an abstract level allows you to
have one test for all platforms
• When the logic changes, the logic only exists one place in
your automation code
23. AN ABSTRACTED
TEST
[C#]
namespace Automation.Tests
{
public static class SignInWithDeactivatedAccountTest: Test
{
public static void Run()
{
AutomationClient [] clients = new AutomationClient[] {
new WebClient(), new iPhoneClient() }
var account = APIUtility.Accounts.CreateTestAccount();
APIUtility.Accounts.Deactivate(account);
foreach(AutomationClient client in clients)
{
client.SignUpInterface.SignIn(account.email, acount.password);
Log.VerifyFalse(!client.IsSignedIn());
}}}}
24. CONCLUSION
Developers and Designers frequently have to be able to adapt to
rapidly changing code, automation writers can be just as nimble.
If you design and abstract your code well, you can build
smaller, more robust and agile automation scripts.
If anyone is interested in taking up work on bringing iOS support
to Selenium… Call Me.
25. MORE INFO
Dan Cuellar
Lead Software Engineer – QA Team
danc@zoosk.com
(Email me to retrieve related source code available for sharing)
See Also
Self-Generating Test Artifacts for Selenium WebDriver
Tue 12:20PM – Track B – Marcus Merrell
Building Quality on Foundations of Mud
Tue 2:40PM – Track A – Kristian Rosenwold
The Restless Are Going Native
Wed 2:20PM – Track A – Dante Briones