Click here to load reader
Upload
kapil-rajpurohit
View
391
Download
2
Embed Size (px)
Citation preview
AUTOMATION TESTING & UNIT TESTING(JUNIT)
BY :- KAPIL
CONTENTS
AUTOMATION TESTING
SELENIUM IDE
UNIT TESTING
JUNIT
AUTOMATION TESTING
Due to the financial situations in the world today, to save money and make the most of every
project, software development organisations and software developers face a challenge of
completing software projects in lesser and lesser amount of time and using minimal resources.
Automation testing which is also known as Test Automation is when the tester writes scripts and
uses another software to test the Product.
Automation Testing is used to re-run the test scenarios that were performed manually, quickly
and repeatedly.
It increases the test coverage; improve accuracy, saves time and money in comparison to
manual testing.
“Automation is the use of tools and strategies that reduce human
involvement or interaction in unskilled, repetitive or redundant tasks”
OBJECTIVES OF SOFTWARE TEST AUTOMATION
To reduce Testing Cost and Time.
To speed up the Testing Process.
To help improve Quality.
To improve Test coverage.
To reduce Manual Intervention.
Programmable
APPROACHES TO TEST AUTOMATION
1. Code-driven testing.
2. Graphical user interface testing.
DRAWBACKS
If the application / product do not have many release cycles, it is not worth the time and
money automating for one/two cycles.
The automation process is expensive.
All areas of the application/product cannot be automated. There would be certain limitations
in certain areas.
If the Customers requirement are frequently changing.
SELENIUM
Selenium is a robust set of tools that supports rapid development of test automation for web-
based applications.
Selenium provides a rich set of testing functions specifically geared to the needs of testing of a
web application.
Selenium operations are highly flexible, allowing many options for locating UI elements and
comparing expected test results against actual application behavior.
Allows scripting in several languages like Java, C#, PHP and Python.
Assertion statements provide an efficient way of comparing expected and actual results.
SELENIUM IDE
Selenium IDE is an integrated development environment for Selenium tests.
It is implemented as a Firefox extension, and allows you to record, edit, and
replay the test in firefox .
Selenium IDE allows you to save tests as HTML, Java, Ruby scripts, or any other
format.
It allows you to automatically add assertions to all the pages.
UNIT TESTING
Unit Testing is a level of the software testing process where individual units/components of a
software/system are tested.
The primary goal of unit testing is to take the smallest piece of testable software in the
application, isolate it from the remainder of the code, and determine whether it behaves
exactly as you expect.
Each unit is tested separately before integrating them into modules to test the interfaces
between modules.
Unit tests are short code fragments , created by programmers or occasionally by white box
testers during the development process.
BENEFITS OF UNIT TESTING
Unit testing increases confidence in changing/maintaining code.
Codes are more reusable.
Development is faster.
Debugging is easy.
JUNIT
JUnit is a unit testing framework for the Java programming language.
JUnit has been important in the development of test-driven development, and is one of a
family of unit testing frameworks.
JUnit is linked as a JAR at compile-time; the framework resides under package junit .framework
for JUnit 3.8 and earlier, and under package org.junit for JUnit 4 and later.
JUnit promotes the idea of "first testing then coding", which emphasis on setting up the test
data for a piece of code which can be tested first and then can be implemented .
This approach is like "test a little, code a little, test a little, code a little..." which increases
programmer productivity and stability of program code that reduces programmer stress and
the time spent on debugging.
FEATURES OF JUNIT
JUnit is an open source framework which is used for writing & running tests.
Provides Annotation to identify the test methods.
Provides Assertions for testing expected results.
Provides Test runners for running tests.
JUnit tests allow you to write code faster which increasing quality
JUnit is elegantly simple. It is less complex & takes less time.
JUnit tests can be run automatically and they check their own results and provide immediate
feedback. There's no need to manually comb through a report of test results.
THANKS