Showing posts with label web. Show all posts
Showing posts with label web. Show all posts

Sunday, May 22, 2022

Automating the real-user scenarios across multi-apps, and multi-devices

Simulating real-user scenarios as part of your automation is a solved problem. You need to understand the domain, the product, the user, and then define and implement your scenario.

But there are some types of scenarios that are complex to implement. These are the real-world scenarios having multiple personas (users) interacting with each other to use some business functionalities. These personas may be on the same platform or different (web / mobile-web / native apps / desktop applications).

Example scenarios:

  • How do you check if more than 1 person is able to join a zoom / teams meeting? And that they can interact with each other?
  • How do you check if the end-2-end scenario that involves multiple users, across multiple apps works as expected?
    • Given user places order on Amazon (app / browser)
    • When delivery agent delivers the order (using Delivery app)
    • Then user can see the order status as "Delivered"

Even though we will automate and test each application in such interactions independently, or test each persona scenarios independently, we need a way to build confidence that these multiple personas and applications can work together. These scenarios are critical to automate!

teswiz, an open-source framework can easily automate these multi-user, multi-app, multi-device scenarios. 

Example: Multi-user, Multi-device test scenario

 

Example: Multi-user, Multi-app, Multi-device test scenario

See teswiz and getting-started-with-teswiz projects for information, or contact me.
 

Monday, February 21, 2022

Why not to use PageFactory and FindsBy in Selenium WebDriver

Many users of Selenium WebDriver may be using the PageFactory created by Simon Stewart. However, it is not a good idea to use it.

You may be thinking why should I not use it? It is so easy to use it, and its popular.

Well, here are 2 reasons why you should not use the PageFactory:

Reason #1. Simon Stewart (https://twitter.com/shs96c), the creator of WebDriver, and the PageFactory himself says, do not use it. It is not recommended.

The `FindsBy` annotation isn't recommended, because the PageFactory class is really badly implemented and inflexible, but it's not going away in the java bindings.

The `FindsByX` interfaces are going away. Better to use a `By` locator and use that.


PageFactory is really badly implemented
 

https://twitter.com/shs96c/status/1196865907185868801


Reason #2: While Reason #1 should have been sufficient, many people implementing automation using Selenium WebDriver do not know, or did not pay heed to what Simon said. So another WebDriver & WATIR contributor, Titus Fortner (https://twitter.com/titusfortner) explained in detail why using PageFactory is not a good idea in his blog post - https://titusfortner.com/2021/02/03/page-factory-optimization.html

 

I sincerely hope these reasons are sufficient for you to move away from the PageFactory and use something more efficient. 

 

Wednesday, January 19, 2022

Using fakesms service in Functional Test Automation

How do you automate OTP related test scenarios? Do you use a fake SMS service? Does it have restapi to query the SMS messages? geography support? 

To clarify - this needs to be done as part of my functional test automation, where,

  • the test could be running against a browser, where the browser does not have access to the phone, or,
  • the test could be running against a real mobile device (without SIM), so no way to receive the SMS, or,
  • the test could be running against an emulator (no SIM), so no way to receive the SMS
Scenarios include: login, payment, SMS content 

Hence I am thinking about using a fakesms service which has API access capabilities to retrieve the SMS. This will help when running automation on browser or devices / emulators without SIM.

Note:
  • There is no access to DB or API to query the OTP. 
  • I don't mind using a paid service

 

Thanks in advance for your help!