Use of Programming for Selenium

Programming Knowledge for Software Testing:

Conducting Software Testing:

Software Testing can be conducted in two ways, 1) Manual Testing, and 2) Automated Testing or Test Automation. No programming knowledge is required for Manual Testing, but for Automated Testing, especially for Functional Automated Testing.

For Functional Test Automation we use different tools like UFT, Selenium, RFT, SilkTest etc, Programming is required for every tool. Now I am taking Selenium and this usage of programming is almost all common for every Functional Test Tool…

Programming for Selenium
Programming Knowledge for Software Testers

Use Programming for writing Selenium Test cases / Test scrips:

Selenium supports various Programming languages like Java, Python, C#.Net, Perl, Ruby and PHP to write Test scripts, and we can use any one of those languages.

Programming concepts for Selenium, If it is Java or Python or some other language to write Selenium Test scripts. We use programming syntax to write Automated Test scripts, for example if we use Java then we follow Java syntax rules like, Case sensitive and every statement should end with semi colon etc, and I am taking Java Language for Selenium to explain this…..

Java Standard Edition or Core Java is enough for Selenium Testing,

1) Comments

Writing comments is optional in computer programming, in Automated testing also writing comments in Test Scripts is optional but best practice, we write comments in our Test case or Test Scripts.

2) Modifiers

Java has two types of modifiers, 1) Access Modifiers, 2) Non Access Modifiers, We use “public” Access Modifier for our Test Scripts. In Non Access Modifiers we use “static” for creating Static Variables and Static Methods, “final” modifier for creating final variables, final methods etc…

3) Data Types

We use Data Types to handle different types of data in our Test Cases / Test Scripts

4) Variables

We use variables for our Automated Testing to store data and for process the data..

5) Operators

We use Operations in order to perform Mathematical, Comparison, and Logical Operations.

6) Control Flow

a) Conditional / Decision Making Statements

b) Loop Statements

c) Branching Statements

7) String Handling

String handling is important for our Automated Testing, whenever we read data then computer program considers the data as String type data, if we read numeric data then we need to convert the data in order to perform mathematical calculations.

8) Array, ArrayList

Array is static data structure and ArrayList is Dynamic data structure, Arrays may used to read tabular format data like excel data…

9) Input & Output Operations and File Handling

We use read user input and display output and read & write files in Automated Testing for Data Driver Testing and exporting Test Results.

10) Methods

a) Built-in Methods

b) User defined Methods

11) Exception Handling

We use exception handling mechanism in order to handle Run time errors in our Test Scripts.

12) Object Oriented Programming

a) Inheritance

Inheritance may be used to reuse Java Class members from one class to another

b) Polymorphism

c) Abstraction

d) Encapsulation
———
Constructor – Java Constructor is used for Page Object Model (Creating Object Repositories…)
Interface – Ni use for Automated testing.
etc…

 

Follow me on social media: