Showing posts with label Junit. Show all posts
Showing posts with label Junit. Show all posts

Wednesday, 31 August 2016

How do QA Engineer perform Unit Testing?

Many of our readers ask question, how to perform unit testing while I don't know code or don't know how to code?


Usually testers don't perform unit testing. Developers write unit tests and ideally run them every time the software builds.

A unit is the smallest testable part of an application like functions, classes, procedures, interfaces. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. In other words, Unit test are small programs which call small units of code being developed and test if the call returns expected values (or makes expected changes). Unit testing is performed by program (which runs unit tests: test runner), not by a human. It's purpose is to test a single unit of code. 

This means that they are not testing through the application user interface, but are running directly against the single unit they are testing and using stub/mock data to simulate the unit's dependencies. That' why it is written and executed by software developers to make sure that code meets its design and requirements behaves as expected. 


Someone with no programming skills by definition is not able to write unit test. It also does not make sense for anyone else than a developer to write unit tests. To write them, you have to be extremely familiar with the minute details of the code, how code works from the inside. Only developers have such detailed knowledge (usually only of some parts of the whole system).

QA testers do not require such detailed knowledge of the code deep insides. They are focused on how different parts of the code fit together, and how they perform actions which user wants. It is very useful to perform such testing by someone who did not write the code, to flush out some unsaid assumptions.

Having said that it is beneficial for a tester to have some knowledge of the system insides, so tester can better develop test strategies to test parts of the system which were not directly changed by a code path tested, but can be affected by the changes. But such knowledge is in more general terms, not on level of the detailed function calls and parameters passed.

Tuesday, 4 February 2014

Working with Selenium WebDriver and Cucumber without Maven

Download jar files

List of jar file needed to configure Cucumber is as follows -
1.       cucumber-core-1.1.5.jar
2.       cucumber-html-0.2.3.jar
3.       cucumber-java-1.1.5.jar
4.       cucumber-junit-1.1.5.jar
5.       cucumber-jvm-deps-1.0.3.jar
6.       gherkin-2.12.2.jar
7.       hamcrest-core-1.3.jar
8.       jchronic-0.2.6.jar
9.       Junit-4.11.jar
10.     Selenium-server-standalone-2.39.0.jar


Create Cucumber Project in Eclipse

1. Go to [File -> New -> Java Project]

2. Enter project name in [Project Name] field

3. Click on [Finish] button

4. Delete [src ] folder of this project

5. [Right click on Project folder] & select [Source Folder]

6. Enter value [src/test/resources] in [Folder Name] field

7. Click on [Finish] button

8. [Right click on Project folder] & select [Source Folder]

9. Enter value [src/test/java] in [Folder Name] field

10. Click on [Finish] button

11. [Right click on Project folder] & select [Source Folder]

12. Enter value [src/main/java] in [Folder Name] field

13. Click on [Finish] button


14.  Add above downloaded jar file into Build path of your Selenium Project.