Skip to main content

Programming Knowledge for Software Testers

Now a days programming knowledge is essential for every Software professional,
For Software developers Programming knowledge is mainstream so it is mandatory,
For Software Testers who wants to use automation tools (Ex: UFT/QTP or Selenium etc...) it is important,

For Database Developers also it is important (ex: In Oracle RDBMS they use Procedure Language),

For System Administrators/Network Administrators also programming knowledge is important (ex: In Shell scripting they use programming features/logic).

So Programming knowledge is important for every Software professional.

Software Testing:
 
Software Testing can be done in two ways,

1) Manual Testing
(Testing Computer Software, Mobile Software manually without using any tool or program)

2) Test Automation / Automated Testing
(Testing Computer Software, Mobile Software using any automation tool or program)

If we follow Manual Testing then Programming knowledge is optional or not required, just understanding requirements, writing test cases, executing test cases, finding defects and reporting.

Understanding, Reasoning, Documentation, Executing and Reporting these are the important skills for Manual Testing.

If it is Test Automation or Automated Testing apart from Manual Testing knowledge Programming knowledge also required.

You take any automation tool UFT or RFT or Selenium etc.. They use any one the programming languages to enhance Test cases.

UFT uses VBScript,

Selenium Supports various Programming languages (Java, C#, Python, Perl, PHP, Ruby) you can use any one supported programming language.

You take any programming language or Scripting Language 80% skeleton is same. Syntax may vary from one language to another and some features may vary from one language to another.

For example,

1) In VBScript every If statement should close with End IF Statement, but in Java if condition enclosed with {}.

2) In C Language no Object concept but Function is there for code reusability, in Java we use Object for code reusability. Functions and Methods both are same in purpose (*some difference is there).

If you learn any one programming language then learning other programming language is very easy, why because most of the Programming concepts are common in purpose, Syntax may vary and some features may vary from one language to another.

Important Languages:
 
C Language - It is Structure Programming Language

Java - Object Oriented programming Language

VBScript - Object based Scripting Language
----------------------
Programming Fundamentals and Features for Testers

1) Comments

    > To make the Code Readable
    > To make the Code disable from Execution.

Note: Writing comments is not mandatory but best practice (Coding standard).
----------------------------------------------------
2) Data Types
 
A Data Type is a classification of the type of data that a variable or object can hold in computer programming.

Example:

Character,

Integer,

String

Float

Boolean etc...
----------------------------------------------------
3) Modifiers
 
Modifiers are used to set access levels.
----------------------------------------------------
4) Variables
 
Variable is a named memory location to store temporary data within a program.
----------------------------------------------------
5) Operators
 
Operators are used to perform Mathematical, Comparison and Logical Operations.

Categories of Operators:
 
i) Arithmetic Operators

ii) Relational Operators

iii) Assignment Operators

iv) Logical Operators etc...
----------------------------------------------------
Flow Control     Conditional Statements
    Loop Statements
----------------------------------------------------
6) Conditional Statements
 
Ex: if statement
-----------------------
Types of Conditions
 
i) Single Condition (Positive/Negative)

ii) Compound Condition (Positive/Negative)

iii) Nested Condition (Positive/Negative)
---------------------------------------
Usage of Conditional Statements
 
i) Execute a block of statements when a condition is true.

ii) Execute a block of statements when a condition is true, otherwise execute another block of statements.

iiii) Execute a block of statements when a Compound condition is true, otherwise execute another block of statements.

iv) Decide among several alternates (Else if)

v) Execute a block of statements when more than one condition is true (Nested if).
Etc...
----------------------------------------------------
7) Loop Statements
 
Used for Repetitive execution.

Ex: for loop, while loop etc...
----------------------------------------------------
8) Arrays
 
> Generally, Array is a collection of similar type of elements.

> In Java, Array is an Object that contains elements of similar data type.

> In C language Array is variable only and VBScript also Array is just variable (two type of variables in VBScript 1) Scalar variables 2) array Variables)

> Array is index based, index starts from zero.
--------------------------------------
9) IO (Input and Output) Operations
 
> Read data using Input devices.

> Display output on the Console.

> Read data from files / write data
-------------------------------------------------
10) Functions, Methods
 
Methods are also known as Functions.

> In Structured Programming (Ex: C Language) we use Functions (Built-in and User defined)

> In Object Oriented Programming (Ex: Java Language) we use Methods (Built-in and User defined)
----------------------------------------------------
11) Regular Expressions
 
It is a formula for matching patterns, A Regular expression defines search pattern for Strings.


Constant matching

india.doc - india.doc

Pattern matching

i*.

ia.....
ib....
.
.
india.doc
----------------------------------------------------
12) Exception Handling
 
In Computer Programming, Exception is an abnormal condition.

> An exception is an event that occurs during the execution of a program that disturbs the normal flow of instructions.

> The Exception handling is one of the powerful mechanisms to handle Run-time errors.
----------------------------------------------------
13) File Handling
 
Handling Drives, Folders, Flat files, Excel files, Database files etc...
----------------------------------
14) Coding Standards etc...
 
Above are the common programming concepts and you can find some other concepts in Computer programming.

For example OOPS concepts in Java,

Java Object Oriented Programming System (OOPS) concepts.

Four fundamentals of OOPS
 
1) Inheritance

2) Polymorphism

3) Abstraction

4) Encapsulation

Comments

Popular posts from this blog

Mobile Application Testing Checklist

1. DEVICE SPECIFIC CHECKS 1.1  Can the app be installed on the device? 1.2 Does the app behave as designed/desired if there is an incoming call? 1.3 Does the app behave as designed/desired if there is an incoming SMS? 1.4 Does the app behave as designed/desired if the charger is connected? 1.5 Does the app behave as designed/desired if the charger is disconnected? 1.6 Does the app behave as designed/desired if the device goes to sleeping mode 1.7 Does the app behave as designed/desired if the device resumes from sleeping mode 1.8  Does the app behave as designed/desired if the device resumes from lock screen? 1.9    Does the app behave as designed/desired if the device is tilted? 1.10  Does the app behave as designed/desired if the device is shaken? 1.11 Does the app behave as designed/desired if a local message is coming from another app (think   of: calendar reminders, to-do task etc.). 1.12 Does the app behave as designed/desired if a push message i...

Test Scenarios for Excel Export Functionality

1. The file should get exported in the proper file extension. 2. The file name for the exported Excel file should be as per the standards e.g. if the file name is using the timestamp, it should get replaced properly with an actual timestamp at the time of exporting the file. 3. Check for date format if exported Excel file contains the date columns. 4. Check number formatting for numeric or currency values. Formatting should be the same as shown on the page. 5. The exported file should have columns with proper column names. 6. Default page sorting should be carried in the exported file as well. 7. Excel file data should be formatted properly with header and footer text, date, page numbers etc. values for all pages. 8. Check if the data displayed on a page and exported Excel file is the same. 9. Check export functionality when pagination is enabled. 10. Check if export button is showing proper icon according to the exported file type E.g . Excel file icon for xls files 11. ...

Software Testing Tips

Here are some of the Best Testing Practices which I learned by Experience:  1) Learn to analyze your test results thoroughly. Do not ignore any test result. The final test result may be ‘pass’ or ‘fail’, but troubleshooting the root cause of ‘fail’ will give you the solution of the problem. Testers will be respected if they not only log the bugs but also provide solutions. 2) Learn to maximize the test coverage each time you test any application. 100% test coverage might not be possible but still, you can always try to reach near it. 3) In order to ensure maximum test coverage, break your application under test (AUT), into smaller functional modules. Write test cases on such individual unit modules. Also if possible break these modules into smaller parts. E.g : Lets assume that you have divided your website application in modules and ‘accepting user information’ is one of the modules. You can break this ‘User information’ screen into smaller parts for writing ...