Reader small image

You're reading from  Test Automation Engineering Handbook

Product typeBook
Published inJan 2023
PublisherPackt
ISBN-139781804615492
Edition1st Edition
Right arrow
Author (1)
Manikandan Sambamurthy
Manikandan Sambamurthy
author image
Manikandan Sambamurthy

Manikandan Sambamurthy has been a software engineer particularly focused on quality engineering efforts for over 15 years. He has helped several enterprise organizations formulate and implement their test strategies successfully. He has built and mentored diverse and smooth-functioning quality engineering teams throughout his career. Manikandan himself is a prolific tester and specializes in full stack test automation. He is a life-long learner and possesses tremendous knowledge on both front-end and back-end test technologies. He has led various continuous improvement efforts improving quality and productivity of entire software engineering teams. With his deep understanding and expertise in the quality area, he has induced considerable cost-savings across organizations through meticulous customizations of test automation frameworks. When he is not working on software, he loves to travel, read about science, and spend time with his family. He is an ardent sports fan currently residing in the San Francisco Bay Area.
Read more about Manikandan Sambamurthy

Right arrow

Getting Started with the Basics

In the previous chapter, Common Tools and Frameworks, we gained sufficient context on the various tools that an automation engineer will use day-to-day. We will extend that journey in this chapter by diving deeper into some advanced Git topics in the first part. Then, we will look at how to download and set up an Integrated Development Environment (IDE). Finally, we will expand our learning to include the basics of JavaScript. The following is the list of topics we will be going over:

  • Getting more familiar with Git
  • Using an IDE
  • Introduction to JavaScript

Technical requirements

In this chapter, we will continue looking at working examples of Git through the Command-Line Interface (CLI). We will be using the Terminal software on the Mac for our examples. Windows users can use the built-in PowerShell to execute these commands. We will also be downloading and exploring VS Code, which is an IDE. Please check this page for the download requirements: https://code.visualstudio.com/docs/supporting/requirements. We also expect you to know the basics of HTML to follow along with the next section on JavaScript.

All the code snippets can be found in the GitHub repository: https://github.com/PacktPublishing/B19046_Test-Automation-Engineering-Handbook in the src/ch4 folder.

Getting more familiar with Git

For quality engineers, being proficient in Git and its usage is as important as their knowledge of test automation frameworks. Committing changes and managing branches are critical tasks that they should know by rote. It not only boosts their productivity but also makes the collaboration with the rest of the engineers seamless. In the next section, let us look a little deeper into committing a change and what goes into a commit message.

Committing a change

In the previous chapter, we briefly looked at what a Git commit command does. The commit command helps save all the changes made in the local repository.

Now, let’s look at the importance of writing a descriptive commit message.

Importance of a commit message

More often than not, every software engineer views the commit history to understand what changes went in and why they were made. Anyone viewing a commit message should be able to get adequate context on why a certain change...

Using an IDE

Quality engineering work demands working with various tools, and the right set of tools tends to make the engineer’s job extremely efficient and productive. An IDE ranks among the top in helping engineers write and deploy high-quality code with speed and reliability. Before getting into the nitty-gritty of an IDE, let us try to understand what makes them so powerful. Apart from IDEs, some programmers prefer using text editors for writing code, and they are nothing more than tools that help edit text. Programmers regularly spend an enormous amount of time dealing with formatting and syntax details. There are text editors that come with syntax highlighting and color-coding that make their lives easier. These are usually apt for an experienced programmer. An IDE is a powerful tool that provides debugging, build management, and IntelliSensing features. It helps the programmer get up and running with a complex project really quickly. There is usually some learning curve...

Introduction to JavaScript

JavaScript is the most common web programming language, and it is imperative for quality engineers to familiarize themselves with the basics. With minor exceptions, we will be using JavaScript to automate various levels of the application stack in the rest of this book. Let us start with the question of why we should learn JavaScript.

Why learn JavaScript?

One of the primary reasons to learn JavaScript is its complete integration with HTML/CSS and that it is enabled to work on all browsers. This makes it extremely easy to create and execute scripts. It is also a loosely typed language that provides engineers with great flexibility when writing applications. Its event-driven architecture helps engineers perform rigorous read/write operations with ease at a scale. Even though it was initially created to run only on browsers, it is currently being used extensively for building server-side applications. JavaScript, as a programming language, caters to beginner...

Summary

This chapter encompassed a considerable number of hands-on skills that a quality engineer uses daily. We started the chapter by looking into the various aspects of selecting an IDE. We moved on to downloading and setting up VS Code on macOS. We also learned how to search and use an extension from the VS Code Marketplace. We commenced our JavaScript learning in the subsequent section by understanding why we should learn it and laid a solid foundation with concepts such as variables and data types. We then learned about string operations before getting introduced to JavaScript objects. We dealt in detail with arrays and object literals.

We concluded our introduction to JavaScript by gaining knowledge about loops, conditionals, and functions. We grasped a little more detail on Git topics such as commits and merge conflicts. We closed out that section by learning some additional Git commands.

This sets us up excellently for the next chapter, Test Automation for Web. You will...

Questions

  1. What are some factors to consider when choosing an IDE?
  2. What is the difference between creating a variable using let and const?
  3. How can we check whether an element is present in an array?
  4. What are the advantages of object destructuring?
  5. How are functions defined in JavaScript?
  6. What does a git bisect command do?
  7. What are some ways to avoid merge conflicts?
  8. Why is a git commit message important?
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Test Automation Engineering Handbook
Published in: Jan 2023Publisher: PacktISBN-13: 9781804615492
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Manikandan Sambamurthy

Manikandan Sambamurthy has been a software engineer particularly focused on quality engineering efforts for over 15 years. He has helped several enterprise organizations formulate and implement their test strategies successfully. He has built and mentored diverse and smooth-functioning quality engineering teams throughout his career. Manikandan himself is a prolific tester and specializes in full stack test automation. He is a life-long learner and possesses tremendous knowledge on both front-end and back-end test technologies. He has led various continuous improvement efforts improving quality and productivity of entire software engineering teams. With his deep understanding and expertise in the quality area, he has induced considerable cost-savings across organizations through meticulous customizations of test automation frameworks. When he is not working on software, he loves to travel, read about science, and spend time with his family. He is an ardent sports fan currently residing in the San Francisco Bay Area.
Read more about Manikandan Sambamurthy