Wednesday, February 24, 2016

Python Script for Work

So a few months ago I got a job working as a software tester at a company now called Willis Towers Watson. I have to say that I have loved working there, and its also given me an opportunity to keep working on expanding my knowledge of writing code.

A couple days ago, I was actually in the middle of testing an internal tool that we use to send client information to insurance providers. This tool generates XML files from the information that we collect from our customers, and then transmits the information to the insurance providers. We call these tools "dispatchers", and each carrier/provider has its own dispatcher that we use to send the information.

Whenever there is an update to a dispatcher, we have to generate the new XML files to make sure that they have the correct information. But this process can take a while since we have to go manually check each line of the XML to make sure that the information is there. This can get tedious and its just not efficient.

One of my team mates mentioned to me that it would be nice if there was a program we could use to check verify the changes instead of doing it by hand. This got me thinking, and I realized that it wouldn't be very hard to get something working. So today I spent part of the day working on a Python script that I could use to verify the updated XML files. Here is what I wrote:


This script takes two files, one file is the XML that we want to look at and the other is just a simple text file with all the tags that you want to verify that have been added/removed from the XML. I then simply print the tags that were found in the file and done.

While testing my code I found that there is a limitation to my script. For example: if I am looking for a tag call Name, the script will say that it has found the tag in the StateName or DoctorName tags. I haven't had time to work on it further, but hopefully I can figure out a way to search for an exact match only. But if not, I still think that my script will cut down in the time it takes for us to check XML files.

Anyways, that's all for now. Thanks for reading!

No comments:

Post a Comment