Anyone can publish on Medium per our Policies, but we don’t fact-check every story. For more info about the coronavirus, see cdc.gov.

Hacking Trakr to track inventory of local toilet papers

Chang Xiao
Mar 27 · 4 min read

Disclaimer: There is no plan to release this feature or create a product based on this any time soon. The purpose of this writing is to potentially show how technology can be rapidly adapted for different use cases. There are also potential ethical concerns raised. We are not making light of the current public health crisis around the world in any way or shape.

Trakr has been built as an automated QA platform that helps websites to detect visual defects, now it can help track your local toilet paper inventory? What?

We spent a couple of days to hack around the tool and met some interesting challenges and other observations.

The example

The example used in this is the website for our main regional grocery chain where people are using to purchase groceries and schedule local delivery.

Image for post
Image for post
www.peapod.com

Starting point: Monitoring interval

Currently, Trakr gives you the ability to schedule your screenshot and tests at a minimum every 24 hours (daily). This is deliberate as we do not want to make excessive requests to the testing sites too frequently.

Image for post
Image for post
Site monitoring capability

However, in the competitive world of inventory monitoring, we need to step up the game and provide the ability to check the inventory more frequently.

Image for post
Image for post

Challenge 1: Localization

The first challenge we faced was the website always redirected on a home page that required you to enter your zip code before it shows you the local inventory.

Image for post
Image for post

We solved this by using our website login feature on Trakr. Although this feature is built to allow testing of websites with user authentication, we hacked it a bit and used the zip code input box as our “login” and “password” field.

This also implied that when we are monitoring the site, we will need to store the username/password so it can enter those when scheduled tests execute.

Image for post
Image for post

Challenge 2: Noise and distractions

So we are able to pass the localization gate and set the proper zip code and get to the toilet paper inventory catalog. Not so fast!

We are being greeted by a message related to current delivery and service limitation, this means we are not going to be able to properly monitor the product listings.

Image for post
Image for post

Again, we can use the page interaction feature in Trakr to “click” the close button on this to remove it

Image for post
Image for post

Also, due to the inconsistency of each page request, sometimes a product image is missing. This can also cause some false positives in our monitoring of the products. Eyes on the prize!

Image for post
Image for post

We can mask all the product images easily. This should allow our monitoring to focus on the Out of Stock button. We can also mask the price and description if they too change frequently.

Image for post
Image for post

Finally, notify and win?

Now, you just need to check the notification for completed tests and add your friends and family. When a product is back in stock you will receive an email notification so you can race to the website to add the product to cart!

Image for post
Image for post

Thoughts and observations

If you read this far, thank you! Obviously, there are other tools out there that are built more specifically for doing this (we will not name names). However, the biggest thought and observation from this is how technology can potentially provide an unfair advantage to a small subset of the population, specifically those that are tech-savvy.

If we wanted to extend this, it’s possible to automate an entire funnel to purchase the products when they first become available.

However, this type of capability in the hands of the vulnerable, needed can serve a positive impact as well!

We will continue to explore how we can adapt Trakr to make a positive impact in these uncertain and crazy times.

take care and cheers!

Trakr

Product updates, insights, and everything else on QA…

Chang Xiao

Written by

Trakr

Trakr

Product updates, insights, and everything else on QA automation

Chang Xiao

Written by

Trakr

Trakr

Product updates, insights, and everything else on QA automation

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store