HomeISTQB Foundation Level

ISTQB CTFL – Testing and Debugging

ISTQB CTFL – Testing and Debugging

<<Previous Post                              << Complete Tutorial>>                                 Next Post>>

In this post, I will explain the next topic in the ISTQB CTFL Exam Syllabus i.e. ‘Testing and Debugging’ topics in terms of ISQTB CTFL Exam point of view.

Click here for the ISTQB CTFL Exam Syllabus

All the points in this article fall under the Knowledge Level – K2 category of ISTQB CTFL Exam (i.e. We just need to understand these topics, and no need to by-heart or remember any topic in this article.)

ISTQB CTFL – Testing and Debugging

In order to understand the different between Testing and Debugging in this article, we have to first understand the below points related to Testing:

Testing:

  • > Testing is the process of executing verification and validation tests on the Application under tests, which results in some failures in the working of the application functionalities, due to defects/mistakes made by the developer/business while developing the Software Under Test.

Example for Testing:

In this example, I will practically show you the below things:

    • – How to Execute Tests on the Application Under Test
    • – Understanding Failures caused by defects in the Application Under Test
    • – Understand the defects (i.e. mistakes) made by the developer/business while developing the Application Under Test or Business while creating the Requirements.

Example starts here:

Lets take the below requirement:

Requirement:  The Web Application Under Test should be compatible with both Desktop Browsers and Mobile Browsers.

For Testing the above requirement, we can come-up with good number of Tests dealing with multiple browsers in Desktop OS’s and Mobile OS’s and Devices. As a sample, I am taking the below Test to demonstrate:

Test Scenario: Verify Home Screen of the Application in a Mobile Browser say Chrome of Android Mobile

Test Steps: The following are the different Test Steps for testing this Test Scenario:

  1. Navigate to the Application URL in Android Mobile Web Browser say Chrome
  2. Verify whether the Home Screen of the Application is loaded properly, and the design is compatible or displayed properly in the Mobile View.

On testing this Test, the tester has found a failure on the Home Screen of the Application i.e. ‘Round Trip’ text for the second radio option is losing its alignment when viewed in Mobile view as shown below:

Example for Test Failure

Now the tester will fail the Test under Execution in his Tests checklist and report a defect by documenting the above observed failure details as shown below:

Defect Title: [Android – Chrome] ‘Round Trip’ text for the second radio option on the Home Screen is losing its alignment when viewed in Mobile view

The following are the steps to reproduce this defect:

  1. Navigate to the Application URL in Android Mobile’s Chrome Browser
  2. Observe that the ‘Round Trip’ text of the second radio option on the displayed Home Screen

Expected Result: ‘Round Trip’ text on the Home screen should be aligned properly with the second radio option in the Android Chrome Mobile view.

Actual Result: ‘Round Trip’ text on the Home Screen has lost its alignment when viewed in the Android Chrome Mobile view as shown in the below screenshot:

Defect Screenshot:

Example for Test Failure

Apart from the above, we can add more details in this defect report. As we are in the beginning state and I don’t want to complicate this topic, I have decided to explain the additional details to be added in the defect report in the upcoming ISTQB CTFL Tutorial topics.

Now, we have understood what exactly is meant by Testing. Lets move to the next continuation topic i.e. Debugging.

Debugging:

Once the defect is identified and reported by the Testers, it will be transferred to the Developers of the Application under Test.

Developers will start Debugging the received defect, to figure out the root cause of the defect and followed by fixing it.

Hence Debugging is the step by step process followed by the developers to find the root cause of the defect to remove it from the application source code (i.e. defect fixing).

Example for Debugging:

Let’s say we have reported a defect stating “Welcome to QAFox” message is getting printed on the Application infinite times, instead of only 10 times.

Now the developer will start debugging the code related to the defect as shown below:

1) Let’s assume that the following is the code written by developer for this feature:

Debugging and Fixing - Developer Sample Code

2) Developer reads the defect report and examines the above program to reproduce the defect at his end. Lets say the defect has been reproduced and the “Welcome to QAFox” is being printed infinite times instead of 10 times.

3) Now the developer start looking at the program code and decides to debug the code for fixing it. Debugging process followed by him will be explained in the below steps:

Note: If you are new to programming, understand the steps at a high and non-technical level only. It is not required for you to understand the technical code shown in the below screenshots. Its only required to understand what going on as part of debugging process at a high level.

4) First, the developer marks the break point in the code with an intention of finding the root cause of the defect:

Debugging and Fixing - Break Point

5) Developer clicks on the ‘Debug’ icon to switch from development mode to debug mode as shown below:

Debugging and Fixing - Debug Option

6) After switching to the Debugging mode, the developer clicks on ‘Step Into’ option to cross check each and every line in the code following the break point set in the above step, as shown below:

Debugging and Fixing - Debug Step by Step using Step Into

7) After the above debugging process, the developer was able to identify the root cause i.e. There is a mistake in the for loop code. Developer made a mistake by forgetting to add variable increment say i++ in the for loop. Now the developer will fix the code by simply adding the missing i++ in the above code.

This is how the debugging process will be done. I have taken a very simple example though. In real time, this will be a tedious process for the developers to fix the defects by debugging.

Now, the ball will come to Testers court, where the Tester need to recheck the reproducibility of fixed defect. If the defect is reproducing again, he will report to the developer again until it gets fixed.

More points about debugging:

  • > In most of the cases, the Tester will perform Testing and the developer will  perform Debugging and component testing.
  • > In some cases, the tester will also involve in Debugging and Component Testing.

Hope, it is now clear on “What is Testing?” and “What is Debugging”.

Next Steps:

> To learn more about ISTQB CTFL, continue to the next post (Click on Next Post link below)

> Check complete ISTQB CTFL Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning 🙂

About Me > Sandeep Patil

Connect to me on Linked In (Click here)

On a mission to contribute to the Software Testing Community in all possible ways.

<<Previous Post                              << Complete Tutorial>>                                 Next Post>>

If you like this article, share it on LinkedIn using the below button:

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *