Unit Testing Continuous Integration PYUNIT AND JENKINS FRAMEWORK Presenter Rachita Agasthy.

Slides:



Advertisements
Similar presentations
CIT 590 Unit testing.
Advertisements

Software Testing Workshop Regression Automation 11-Jul-08 COPYRIGHT NOTICE Copyright © 2008 Polaris Software Lab Limited All rights reserved. These materials.
By SAG Objectives Cross platform QA Automation for web applications Scheduling the automation Automatically build the test scripts Generate the.
CONTINUOUS INTEGRATION AND TEST Stephen Oglesby - CSCI577b – April 2011.
Rtizen ‘s Introduction to EDA Solutions It’s a software tool to make error free engineering drawings (both 2d & 3d) in a cost effective way.
Roadmap to Continuous Integration Testing and Benefits Gowri Selka, Walgreens Natalie Koltun, Walgreens May 20th, 2014 ©2013 Walgreen Co. All rights reserved.
Testing by Duncan Butler Sara Stephens. Too much to cover.
CSE 219 COMPUTER SCIENCE III PROPERTIES OF HIGH QUALITY SOFTWARE.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
© Company Confidentialwww.itcinfotech.com Business Case for Test Automation S.Janardhanan Chief Technology Officer ITC Infotech India Limited Business.
Unit Testing Using PyUnit Monther Suboh Yazan Hamam Saddam Al-Mahasneh Miran Ahmad
CZ Biz. Auto. System & Test-Driven Development Teoman Soygul (Sept 24, 2012).
Introduction to Continuous Integration Mike Roberts.
Automation using Selenium Authored & Presented by : Chinmay Sathe & Amit Prabhu Cybage Software Pvt. Ltd.
DNN LOVES JENKINS FOR CONTINUOUS INTEGRATION
Włodzimierz Funika, Filip Szura Automation of decision making for monitoring systems.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
1. Topics to be discussed Introduction Objectives Testing Life Cycle Verification Vs Validation Testing Methodology Testing Levels 2.
© 2012 WIPRO LTD | 1 Version 1.0a, 23 rd April 2012 TTCN-3 Users Conference Practical integration of TTCN-3 with Robot test automation framework.
Testing.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
Testing in Extreme Programming
Unit and Functional Testing Your Flex Applications Mike Nimer Dir. Of Engineering nomee.com.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
1 SEG4912 University of Ottawa by Jason Kealey Software Engineering Capstone Project Tools and Technologies.
Static Testing Code Review/Verification –Code is reviewed by the developer after each change Individually and with code sessions –Use of Visual Studio’s.
Testing 1 © Minder Chen, Source: Developing Web Applications with Microsoft Visual Basic.NET and Microsoft Visual C#.NET Testing Test plan objectives.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Created by Jan Medved Integration & Test Strategy for Lithium.
Amir Iqbal L Mahwish Khan L Rabia Akhtar L Nida Sarwar L Cloud Computing Based – Online IDE.
Experience Report: Test Automation in an Agile Environment Len Vaz Oct 13, 2010.
Software Testing Mehwish Shafiq. Testing Testing is carried out to validate and verify the piece developed in order to give user a confidence to use reliable.
OpenCIT and OpenTicket Demonstrating the functionality of the OpenEngSB.
Build automation. Prerequisites for Continuous Integration (CI)  Version Control System  Build automation  Notification on build result sent to related.
Making Software Executable by Others Varun Ratnakar USC/ISI April 17, 2015
Software Quality Assurance and Testing Fazal Rehman Shamil.
Build and Deployment Process Understand NCI’s DevOps and continuous integration requirements Understand NCI’s build and distribution requirements.
Testing JUnit Testing. Testing Testing can mean many different things It certainly includes running a completed program with various inputs It also includes.
Automated Testing April 2001WISQA Meeting Ronald Utz, Automated Software Testing Analyst April 11, 2001.
Testing Frameworks John Paul Ashenfelter CTO/Transitionpoint.
1 Punishment Through Continuous Delivery If it hurts, do it more often…
Software Engineering Lecture 11 Software Testing Presenter: Josef Hallberg 1.
DECTRIS Ltd Baden-Daettwil Switzerland Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)
1 © Agitar Software, 2007 Automated Unit Testing with AgitarOne Presented by Eamon McCormick Senior Solutions Consultant, Agitar Software Inc. Presented.
Selenium Basic Level Training Selenium Training Online.
Chapter 13 Web Application Infrastructure
Implementing Full-Stack Test Automation for Drupal 8
Automated Software Testing
Self Healing and Dynamic Construction Framework:
Delphi or C++ Builder, with Subversion and Jenkins
Topics Introduction to Repetition Structures
CSC 591/791 Reliable Software Systems
Selenium Automation Framework
Michael Mast Senior Architect
Unit Testing & Test-Driven Development for Mere Mortals
Advantages OF BDD Testing
WEBINAR: Becoming Agile In Software Testing: The Government Edition
X in [Integration, Delivery, Deployment]
Lunch & Learn: Are you letting your users be your testers?
Automated Testing and Integration with CI Tool
Unit Testing & Test-Driven Development for Mere Mortals
Continuous Integration Tool
CONTINUOUS INTEGRATION –WHY WE DO IT?
Selenium Tutorials Cheyat Training.
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Java & Testing.
Node.js Test Automation using Oracle Developer Cloud- Simplified
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Software Testing Software Testing is a process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements.
Presentation transcript:

Unit Testing Continuous Integration PYUNIT AND JENKINS FRAMEWORK Presenter Rachita Agasthy

Unit Testing Goal – Isolate parts of the code, test their individual working. Why do Unit testing? Unit testing is a part of most of software development methodologies in use today Agile Methodologies Extreme Programming Test Driven Development

Advantages and Disadvantages Advantages Reduction in flaws – Statistics suggest 90% reduction in bugs during QA process Repeatability – Can reuse the same tests as and when you make changes Disadvantages Requires approximately 30% more time at the start of the project Written by developer, not possible to cover all the cases Frameworks Available – GUnit(C++), JUnit(Java), PyUnit(Python), test-unit(Ruby) and so on.

Unit testing example - PyUnit class Calculator(object): def add(self, value1, value2): return value1 + value2 Actual Code:Test Code: class CalculatorUnitTest(unittest.TestCase): def setup(self): // Code that is common to every // test in this class. myCalculator = Calculator() def test_add(self): // Positive value addition result = myCalculator.add(100, 20) errMsg = “Expected 120 but got ”+ result assert result == 120, errMsg // Negative value addition result = myCalculator.add(-10, -20) errMsg = “Expected -30 but got ”+ result assert result == -30, errMsg if __name__ == "__main__": unittest.main()

Mocking in Unit Tests class Calculator(object): def add(self, value1, value2): return value1 + value2 def multiply(self, value1, value2): result_arr = [] for i in xrange(0,value2/2) result.append(add(value1, value1) if value2 % 2 != 0: result = value1 for value in result_arr: result = result + value1; return result Actual Code:Test Code: class CalculatorUnitTest(unittest.TestCase): def setup(self): // Code that is common to every // test in this class. myCalculator = Calculator() def test_multiply(self): val1 = 10 val2 = 20 // Positive value multiplication myCalculator.add = MagicMock(return_value = 20) result = myCalculator.multiply(val1, val2) errMsg = “Expected 200 but got ”+ result assert result == 200, errMsg if __name__ == "__main__": unittest.main()

Continuous Integration Development work is integrated at a predefined time or event Resulting work is automatically tested and built Advantage ◦Automated Unit Testing ◦Development errors are identified very early in the process ◦Continuous Quality Control Usage: Extensively used in Extreme Programming Frameworks Available – CruiseControl, Jenkins, Buildbot and so on.

Jenkins Open source Java based tool. Basic functionality ◦Detect code changes in the code repository ◦Build different parts of the code ◦Run unit tests ◦Run the different components of the system ◦Verify the output ◦In case of failures, notify the developer who caused the failure. ◦Also notify other developers Requirements ◦Requires installation on the server ◦Accessible through a web page

Homepage

Creating new Job

Enter Job Details

Advanced Job Options

When to run the job?

What happens when job runs?

Other features ◦Managing Jenkins

More managing options

Thank you!