Learning JavaScript is helping me to test

I am learning JavaScript because it helps me in so many ways when I am testing. 

Many apps have JavaScript sandboxes that enable you to write some JavaScript that adds to the testing you are doing. Examples of where you can write JavaScript are the Tests tab in Postman, and browser dev tools which enable you to write JavaScript in the browser via the console or snippets. 

 I am learning how to use JavaScript to help me test, but so many of the resources for learning JavaScript are there to help you learn how to create a web application. I had to find resources to help me learn what I needed, and fortunately there are free resources to help learn how to use JavaScript as part of testing.

I became interested in learning JavaScript when I spent a day using Alan Richardson’s course on Automating the Browser. This taught me how to create bookmarkets which I now use for setting up tests where there are many steps such as filling in personal information on a new account. This meant that instead of spending my time on repetitive manual tasks I could run the bookmarket. I wanted to learn more JavaScript.

When I was creating tests in Postman I wanted to learn how to use the Chai assertion library so that I could make assertions on the HTTP requests I was making. I found the free course Introduction to Chai Assertions  on the Test Automation University. This course enabled me to create useful tests for our API and I discovered the Test Automation University.

I found that the Test Automation University is free and has a wide range of useful courses. There are three JavasScript Learning Paths: Web UI javaScript, Mobile javaScript and API JavaScript. I started by working my way through the Web UI path and then took other courses that I found useful. Through taking these courses I gained a basic knowledge of JavaScript.

The JavaScript I have learned is helping me with test automation. We use Ghost Inspector for automating tests through the UI and it contains a JavaScript sandbox so I started to use the JavaScript I had learned to enhance these tests.

There were other tasks that I wanted to automate such as creating test data via an API. I decided to build on my knowledge of JavaScript and learn to use Nodejs for these tasks. I found a free course on Udemy: Node Js API development for Beginners. What I learned on the course enabled me to write a node app that loads test data.

Pairing with a developer is really helpful. When I had some more difficult code to write on a node app I paired with a developer and learned so much. It also meant that I was progressing in what I could do with JavaScript. Pairing has enabled me to develop automated tests for our API. I have also found code reviews of my code really useful as I learn so much from the developer who is doing the review.

JavaScript is helping me to test and I feel like I have only scratched the surface of what I can do with JavaScript. I am enjoying learning JavaScript and am continuing to learn as I am sure that what I learn will help me be a better tester.

Thank you to the developers who are helping me and thank you to the Test Automation University.

Published by Mike Harris

Mike has been working in testing for 20 years and is currently the lone tester for Geckoboard. He has been a Test Lead and has also worked as a part of waterfall, lean and agile teams. He is also Programme Secretary of BCS SIGiST. Mike has a B.Sc.(HONS) from Middlesex University and is an Associate of the University of Hertfordshire. He has set up and led a Testing Community of Practice and been part of a successful agile transition. He is Co-Programme Chair of the British Computer Society’s Specialist Interest Group in Software Testing. He also contributed to the e-book Testing Stories and has had articles published by the Ministry of Testing. Follow Mike on Twitter: @TestAndAnalysis

Join the Conversation

2 Comments

Leave a comment

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 )

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

Create your website with WordPress.com
Get started
%d bloggers like this: