Tag: QA

  • Testing with Postman: Getting Started

    Testing with Postman: Getting Started

    I am writing a Postman Series to show the full extent of what a software tester can do with this tool. I spent a year learning and cultivating my Postman knowledge because at the time I wanted to show my company what I could bring to the table. I would like to think I became an expert on the subject but have seen many people downplay what postman is capable of via testing.

    While we no longer use Postman, a lot of the excuses I have seen people use as reasons not to use Postman have mostly been something they didn’t know Postman could do. Postman is more capable than what most might think for automation and is not just a manual or codeless tool.

    For those wondering we switched to Rest-Assured so we could store passwords in environmental variables instead of in the code for security reasons.

    What is an API and why am I testing it?

    Wikipedia defines an API as “An application programming interface (API) is a connection between computers or between computer programs.” Most will use it as a communication between a browser and a database stored elsewhere. Behind the prettiness that is this blog there is a lot of APIs that run. GETs, POST, PUTs, DELETEs, and many other quick calls that pull data.

    Even when entering in the web address above and hitting enter, an API is calling a get and pulling down the HTML, CSS, and Javascript for the browser. When coding you want to write lots of integration test which are also known as API test. This test the communication between the website and the database. Input wrong data and the site errors. So you want your test to make sure the site doesn’t break when taking in the right or wrong inputs.

    Testing Basics

    So to get started with postman you will need your API url and whether it is a GET, POST, PUT, DELETE or various other method. Your Developer should give you documentation on what the endpoint is and how it should behave. This is not always the case but you can write some basic test.

    Let’s use the good old Star Wars API for our first setup.Postman with 2 testWe add the URL to Postman and then a cool thing we can then add is 2 test already pre-written for us with a simple click.

    This checks that the status code that comes back is a 200 which means success! For negative test cases you can replace the 200 with a 400 or what ever code you need.COPYCOPY

    pm.test("Status code is 200", function () {
        pm.response.to.have.status(200)
    })
    

    This checks that the API responded back in 200ms which is the standard time we wish the API to respond in. Sadly this test failed.COPYCOPY

    pm.test("Response time is less than 200ms", function () {
        pm.expect(pm.response.responseTime).to.be.below(200)
    })
    

    Note I took out the ;’s cause they are unnecessary.

    There you have written your first test.

    Running Your Test

    You can run each API call individually but the real power is creating a collection of calls that can then run in order. You basically create a folder of your calls and they will run one right after another when you run the collection. Later we will go over how we can run our collection in CLI with Newman.

    Learning Links

  • From Manual to Automation

    From Manual to Automation

    Return of QA Hipster

    I started my QA Journey back in 2013 and it has been a crazy ride to get to where I am today. As unique as my story might be there are many out there who started on a similar path. Sometimes breaking into tech is just finding that one job and moving up from there. I have seen many people in reddit and through out the web looking to get into QA, so I thought I would tell my story and give some pointers on the way.

    Growing Up the Son of a Programmer

    I grew up an elder Millennial in the boom of the internet. My dad was a computer programmer and former accountant. He always questioned purchases and saving money but he never questioned buying me my own computer. I was on a computer since the time of Windows 3.1 playing great games such as Battle Chess and Prince of Persia. Computers came easy to me like a fish to water.

    When I graduated High School I went off to college to study Software Engineering. This plan did not work out as I lost loved ones during that time and sunk into a depression after 3 and a half years away from home. I later finished my degree in Management Information Systems.

    The 2008 Fall of Tech

    When I returned home and was trying to find work 2008 hit. This was as the tech industry had a huge lay off. More qualified people then me were out of jobs and I had to find work elsewhere. I ended up working in group homes because I had experience with autism having an autistic brother. The times were hard but I got by. During this time I started dating my wife and we got married.

    Getting Back in the Game

    When we both were looking for work her brother got me an interview at a Tech Startup. The company was a little old to be a true startup but it had the culture. I started off as Tier 1 support for the software then moved to Tier 2. The entire time I was working support I was also helping out in finding bugs and testing the software. After a year I moved into QA and began my career in a field I now love.

    The software there was written for Macs and was not web based. They kept wanting me to get into automation since I could code but the issue at the time was that the software was not built for it. There was no tags in place, and making the software work for that would have been an major undertaking. Eventually we started building a web based approach. From there I was able to add automation with Java, Selenium, Cucumber, Serenity, and Postman. I spent a year working on automation before I was later recruited to the company I work for now.

    I should note that when I was working as a manual tester, I was always looking to improve myself and read many blogs. I even started one of my own that had 1000 followers called QA Hipster. Eventually I had to give up on the blog as life took many turns but I am hoping to return to the blogosphere with this blog.

    Moving to Automation

    My current job was the hardest most technical interview I have ever been to. They grilled me harder then any other job and unlike the many QA they found before me I passed. I was hired for more then double my previous salary showing me how little I meant to the company I was at previously. They already had 1 very accomplished QA Engineer on the team who had been Automating as long as I had been in QA. He however was mostly frontend and I had backend automation experience from my year building my own testing framework. Luckily before I joined the team had decided to use Postman and I was familiar with it. I will be making more post on Postman as time allows, even though we have moved onto a different framework.

    I took to automating the backend and read many articles so I could become the best I could be. Over the year I wrote thousands of backend test as well as manually testing the front end. The following year the other QA and I trained each other and now we are both good at Frontend and backend automation. I will say that working with someone who learns as fast as you and has the knowledge really helps.

    Find someone that you can grow with, and you will become an unbeatable team. Remember though that just cause you are Automating now does not mean you stop manual testing. Half of automation is manually testing what you are about to automate. Exploratory testing is also a big thing, Users will always find new ways to break the software so try to find those new ways first.

    How Do You Start?

    For those looking to learn automation please visit: Test Automation University

    It was founded by Applitools and has so many great classes for teaching automation for free. If you are wanting to add automation to your current stack, or learn to on your own I highly recommend it. If you don’t know where to start I would start with the Web UI Python Path as Python is now the #1 language instead of Java.