Friday, January 28, 2022

Setting up common software on a new Mac

Have you ever felt it overwhelming to install all the software you commonly need on a new Mac?

I do!

To help in the machine setup, I have a simple script that I execute to get the software installed in a easy and consistent way. You can take a look at it as well here- https://bit.ly/setupMachine

Let me know if you have any other apps that should be added to the script!

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!

Saturday, January 15, 2022

Making Android Studio Emulator work on Mac with M1 chip

Like many who have been using Apple Mac (Pro) with the new M1 chip, I am also very impressed and happy with the laptop. However, there have been challenges in the initial days with some software not working out of the box on this new hardware. 

While most of the issues got resolved, I ran into some very weird issues with one specific software that was essential for my work - running Android emulators off Android Studio.

I saw various errors like:




Eventually, there was an upgrade from Android Studio specifically for Mac M1 chip - the latest one from the website (as of 15 Jan 2022) is version Android Studio Arctic Fox (2020.3.1) Patch 4 (android-studio-2020.3.1.26-mac_arm.dmg).

For some time, I was able to create the emulators and use it. However, something weird happened along the way, and this also stopped working - and I started seeing the same errors as before.

After countless failures from installs, uninstalls of various versions of Android Studio , and the SDK Manager for Android (including different emulator versions), I took the latest Android Studio Chipmunk (2021.2.1) Canary 7 release of Android Studio (android-studio-2021.2.1.7-mac_arm.zip) from Android Studio download archives and that seemed to work out of the box (with my earlier downloaded Android SDKs and Emulator).

Note: This is based on my experiences on Mac OSX Big Sur v11.6.2

Thursday, June 17, 2021

Business-Layer Page-Object Pattern

Business-Layer Page-Object Pattern for Functional / System / end-2-end Test Automation

  1. Tests should talk business language
  2. The test is deterministic, for a specific scenario. The test implementation is an orchestration of corresponding business operations
  3. Business layer is an abstraction layer between the test intent & page objects
  4. Implementation of business layer method is essentially an orchestration of other business operations, or for the granular business operation, an orchestration of page objects
  5. The business layer method does the assertions of expectations
  6. There should be no assertions in page objects
  7. Each operation (in business or page object) being successful means there are a defined number of methods / operations the product can now do (as you are driving the product under test to do your bidding)
  8. Hence, to #7, each operation can have one 1 valid page / business object as its return type


See the sample tests implemented in teswiz for an example of Business-Layer Page-Object pattern implementation.

Wednesday, June 2, 2021

Automating Functional / End-2-End Tests Across Multiple Platforms

Do you want to know more about an approach to Functional (end-to-end) Test Automation that works for a product available on multiple platforms?


If yes, then read my blog post on Automating Functional / End-2-End Tests Across Multiple Platforms which shares details on the thought process & criteria involved in creating a solution that includes how to write the tests, and run it across the multiple platforms without any code change.

Lastly, the open-sourced solution - teswiz also has examples on how to implement a test that orchestrates the simulation between multiple devices / browsers to simulate multiple users interacting with each other as part of the same test.


Friday, May 21, 2021

Setup to make work from home easier for your health

Having a proper setup is very important when working from home. Else it can mess up your posture, back, neck, ...

I recently upgraded my work-from-home setup. If anyone wants suggestions how and what I did, will be happy to share.

 I had posted this on LinkedIn - https://www.linkedin.com/feed/update/urn:li:activity:6799935956540624896/


To my surprise, a lot of people responded to know more about this setup. Instead of replying one at a time, here is what I did to help me have a better work environment. 

But before the solution, here are the problems I was facing:

  • I was sitting for around 10-12 hours on my chair every work-day
  • Though I try to maintain a good posture, I figured out I kept slouching automatically over time
  • As a result, my back started paining

I had to change something quickly, because this weird time is just not ending. 

So, this is what I did. I researched and spoke to lot of people, and figured that a standing desk will help me maintain a good posture and avoid back pain.

My work setup though had a fixed desk, which I could not change. So I did the following setup:

1. Adjustable desk - which I can change to use as a standing desk or sit-down desk

Rife Instant Gas Spring Sit Stand Converter Desk

 


https://www.amazon.in/gp/product/B0749H2WNK

2. Too much standing in the day caused my legs and lower back to start paining. So I invested in a Saddle Seat

Rife Ergonomic Adjustable Rolling Active Chair, Saddle Seat and Angle Adjustment

 

 

https://www.amazon.in/gp/product/B08C2C4RDT

3. To reduce the strain on my eyes, I got a good & large monitor to connect to my laptop, with a keyboard & mouse

Dell 24 inch (60.96 cm) Ultra Thin Bezel LED Backlit Computer Monitor

 

https://www.amazon.in/gp/product/B07NXP6W4Q 

 

4. Because I work on 2 laptops, there was a challenge when I needed to switch between the 2 machines as one laptop had the keyboard and mouse connected, the other did not. So I bought a multi-device wireless keyboard and mouse - which can automatically switch between any laptop of choice - by a click of a button, or a simple gesture. 

Logitech MK850 Multi-Device Wireless Keyboard and Mouse Combo

 

 

https://www.amazon.in/gp/product/B01NAVO5PF


Hope this helps others! 

 

Stay safe, stay healthy!