Understanding Tests

The past few weeks, I’ve been reading up on Google Tests. Its the primary way how developers at Mesos test whether their code is working properly. Google test is a unit testing library for the C++ programming language based on the xUnit architecture. The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. Since Mesos is made up of many different parts such as the Master, Slave, Scheduler, etc. unit testing is quite convenient. To understand anything properly, you have to implement it practically somewhere. So, I read the introduction to Google Tests, and wrote a test for one of the programs I’d written before. I chose a simple one, just to get the hang of it. I was delighted to find out that the test I wrote worked, no matter how easy it was.

Then, I wrote a test for the code that I’d written to display capabilities (ability of a framework to accept revocable resources) on the state.json HTTP endpoint. It took a while because I had to understand to write a test for Mesos. It’s a bit complicated, because you have to mock almost every component of the software, like the master and the scheduler. Capabilities of a framework are only read by the master and allocator, so there was no need to mock a slave. I’ve posted a review request for the test. You can check it out here.

Also, I got wonderful news this week. In my previous blog post, I’d mentioned the MesosCon Diversity Scholarship. Well, I got accepted πŸ˜€ Because I’m still new at being an adult, I had to convince my parents a bit to allow me to go alone all the way to the US. I’m so grateful to them for agreeing! ^_^ I’m so excited because I’ll get to meet my mentor and everyone related to Mesos in real life. It’ll be a great learning experience for me. Looking forward to attending the convention πŸ™‚



One thought on “Understanding Tests

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s