How We Automated Testing for Our Call Tracking

Christoper Prijic
Orbee Auto
Published in
3 min readDec 14, 2018

Recently, the engineering team at Orbee Auto was tasked with automating our integration testing with our call tracking platform. The result of this automation would mean the capability to quickly test all aspects of call tracking whenever we make changes to the product or add new features. This challenge was particularly interesting due to the fact that calling, texting, recording, and routing were all involved — all of which are aspects that usually required manual testing but is now automated with no human involvement.

Automated Conversations

The idea that sparked this was simple: any prompts and processes we go through when manually testing our product can be done with a bot. Since we use Twilio as our voice and text platform, we can utilize their TwiML language to automate and simulate the conversations and scenarios we want.

Now that the idea was set, we went through some simple examples. Assuming a vanilla call tracking solution is to be tested, we needed to connect two phone numbers through a third routing number — our call tracking number.

Callee  →  Call Tracker  →  Agent

First, the callee will dial the click tracker. During the call, the callee uses a script to wait for W seconds, say something, wait another X seconds, then hang up. In a successful test, the call tracker will correctly route the call to the agent number and connect the callee to the agent. The agent themselves will wait for Y seconds, respond back to the callee, then wait Z seconds for the callee to hang up.

example TwiML used in automated testing

The pause allows for the agent to “respond” in this scenario before the hangup. This will be helpful when testing recordings using multiple channels.

In the meantime, our service will also be collecting call logs for different stages of the call. Using this information after the call completes, we can check the duration of the call as well as the phone numbers involved and the routing/dialing performed by the call tracker. When testing recording, we can also test transcriptions against what we expect and check that each side of the call is recorded in its own channel.

If the test fails for any reason, we can reasonably assume the TwiML being pushed to Twilio for our call tracking is incorrect or contains a bug and will need to be fixed. We can utilize different things that happen during the call to help narrow this down — if no call reaches the agent number, we can assume the call tracker is not dialing correctly. If we get mismatching or missing call log events, we can assume that there is an error with our call tracking implementation during the call and need to address our status callbacks.

Future Work

This also works for additional features — we can utilize call recording to check prompts and phrases that are automatically added to the call and can transcribe the recordings to verify call content. Since the voices are static sentences being said by bots, we can more reliably trust the consistency of the transcripts coming through over long periods of time.

Utilizing Twilio’s TwiML features provides us with a way to automate most of our testing and validation to be sure our products are working. Now that this process is in place, Orbee can increase the speed at which we develop and produce new features, updates, and products around our call and text features.

--

--