Saturday, August 8, 2015

Leveraging Personas to Support Test Automation


Leveraging Personas to Support Test Automation


It has been far too long since I wrote an article about test automation.  Since my last article, life has placed me on an interesting path!  During my writing hiatus, I had an opportunity to hangout with family and friends as well as expand my educational horizons by taking certification courses in Scrum while visiting Chicago.  Upon my return to Sweden, I embarked upon a cross country drive through Sweden, Denmark and Germany which not only allowed me to see new sites but to visit friends along the way.  Once I had an opportunity to sit still, work kept be unusually busy and left little to no brain power after work to entertain anything but pure relaxation and enjoying the downtime.

Although my work has taken me to new heights in my career, I still love learning new techniques or exploring ideas to support test automation challenges.  One of the latest ideas I have been experimenting with is using UX developed personas to add spontaneous, dynamic interaction during a test automation run.

 For some of us testers, we do not have the luxury of managing our own test environments.  This means we cannot always expect to have a known, stable base state.  So the problem I was trying to solve was automatically testing a site in its entirety when at any given time, the content available is either unknown or can change without expectation.  One idea was using a combination of a well-defined testcase, the information contained in a UX persona and algorithms to select the required data from the currently available content to click on desired elements or exercise the functions defined in the test case.

How to Bring the Idea to Life


First, I collaborated with a UX developer to create personas that included characteristics such as:

-       the functions they would use on the site
-       the type of configurations they would prefer
-       the type of selections they would make
-       the site features are most often used
-       the language and region options they would select
-       The browser / OS configuration used by the fictitous person
-       the devices they would use and when
-       and of course this list can go on and on

Second, I captured the information provided by the personas in a configuration.  You can choose your preferred method but I elected to try the Spring framework to both manage the configuration of the persona, provide information to the methods for function or content selection, and to set or get data when required.

Third, modify the TestFramework to include classes and methods designed to:

-       Setup profiles/accounts or select the persona’s desired language and configurations
-       Select from the currently available content and feature set
-       Use the selection to perform the required action
-       Perform a test verification
-       Report the findings

Fourth, create the test cases to include steps that:

-       Select a persona
-       Call persona getter, setter, action or verification methods
-       Provide the test results which should include, minimally, screenshots for failed results

 Other Uses of UX Personas in Test Automation

In addition to doing smart test automation, I can also leverage personas to do:

-       Performance and load testing
-       Mobile Device Testing
-       Localization testing
-       Model-Based Testing
-       Behavior Driven Development Testing
-       Test setup and configuration

As always, please share your ideas on how UX personas can support both manual and automated testing.  I will continue having fun learning how to develop a fictitious user groups to assist with testing and development.

 
Happy Automation!

______________________________
Margaret Thomas has worked in the testing profession since 1996 and worked within a number of industries including mobile, finance, medical and insurance.  She developed a strong desire for automated testing when she began working within finance and has utilized a number of testing tools both commercial and open source.  She is also the author of the technical blogs found at http://mag4automation.blogspot.se/.  All articles are exclusively based on her experience and are of her own personal opinion and views.

 

 

No comments:

Post a Comment