The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
TOOLS FOR TESTING SOFTWARE
1. TOOLS FOR SOFTWARE TESTING
CS415 Advanced Software Engineering
A Presentation by Group 5
Mohammed Moishin - S11119760
Darren Chand - S11122084
Mohammed Jamsid - S11120422
Shaneel Sukul - S11108872
2. INTRODUCTION
CS415 Software Engineering
1
• Unit testing involves individually testing unit of code separately to make sure that it works on its
own, independent of the other units.
• Test Driven Development (TDD) is an evolutionary approach to development which combines
test-first development where you write a test before you write just enough production code to
fulfill that test and refactoring.
• Agile development requires solutions and requirements that evolve through the collaborative
effort of self-organizing teams with their end users.
• Agile testing follows the principle of agile development.
3. DISCUSSION FLOW
CS415 Advanced Software Engineering
2
2. Background
3. Criteria used to select the testing tool
4.How to Use
5. Examples and Observations
6. Summary
1. Brief history
4. BRIEF HISTORY
CS415 Advanced Software Engineering
3
• Software testing began in 1950’s.
• 1960’s – 1970 correctness proof method was developed.
• Next method was developed in late 1970’s which tried to find errors in the system that
was not yet discovered.
• In 1980’s defect prevention was included in the process of software testing.
• In 1990’s early test design was developed.
• In 2000’s Business Technology Optimization (BTO) was developed.
6. CS415 Advanced Software Engineering
5
WHY WE NEED SUCH TOOLS
• To point out the defects and errors that were made during the development phases.
• It makes sure of the Customer’s reliability and their satisfaction in the application.
• For an effective performance of software application or product.
• To ensure that the application should not result into any failures because it can be very
expensive late stages of development.
• Improves accuracy.
7. CS415 Advanced Software Engineering
6
• There were many tools available for our purpose.
• We had to select a tool that fitted our criterion best.
8. CS415 Advanced Software Engineering
7
OUR SELECTION CRITERIA
1. The tool should be affordable/free to use.
2. The tool should be easy to use.
3. Experiment with various software automation tools.
4. The tool should allow users to perform meaningful load and performance tests to
accurately measure system performance.
5. The tool should support testing with a variety of user interfaces and create simple to
manage, east-to-modify tests.
9. CS415 Advanced Software Engineering
8
Software Testing
Tool
PHPUnit Codeception Atoum Behat
Brief Description It is a testing framework for
writing Unit Tests for PHP
apps. Unit tests take small
portions of code called
units and test them one by
one.
Multifeatured testing
framework for PHP.
Codeception enables to
write Unit Tests as well as
Functional and Acceptance
tests
Is an intuitive and modern PHP
testing framework that allows
unit tests.
Behaviour-driven PHpP testing
framework. Behat uses the
StoryBDD subtype of behaviour
driven development
Pros • It is basic and basic is
often simpler to start.
(for first timers)
• Best known tool for
Unit Testing.
• It is mature and very
popular.(good
documentation, lots of
tutorials and threads on
it)
• It is more than basic,
features available for
different types of testing.
• Provides support for
different other testing
framework.
• Its test cases are written
in PHP.
• Atoum is feature rich
tool.
• Is very extensible
• Integrates well with
many web servers.
• Community support is
phenomenal.
• Test cases are human
friendly.
• Behat is feature rich tool.
• Test cases and
maintenance of tests in
Behat is easier.
Cons • Not better for API
testing or acceptance
testing because of
higher level different
than Unit testing.
• Is very limited.
• Does not have much
documentation and
resources compared to
PHPUnit.
• Not much simpler and
easier to configure than
PHPUnit.
• Doesn’t have proper
abstraction for most
areas of operation.
• Not recommended for
small projects.
• Higher memory usage.
• API testing needs more
tools to integrate with.
• Due to more layers
involved
11. CS415 Advanced Software Engineering
10
The PHP Testing Framework
• Created by Sebastian Bergmann and its development is hosted on Github
• Is a unit testing framework for the PHP language.
• It is an instance of the xUnit architecture for unit testing frameworks that originated with Sunit and became
popular with Junit.
• Is used for our backend.
12. CS415 Advanced Software Engineering
11
Software Testing
Tool
Brief Description Jasmine is a Behaviour
Driven Development
testing framework for
JavaScript. It does not
rely on browsers, DOM,
or any JavaScript
framework
Appium is an open source
test automation
framework for use with
native, hybrid, and mobile
web apps. It drives iOS
and Android apps using
the WebDriver protocol
Jest provides you with
multiple layers on top of
Jasmine.
Selenium automates browsers.
That's it! Primarily, it is for
automating web applications
for testing purposes.
Pros • Can be used for TDD
• Open source
• Great community
• Easy to setup
• Simple
• No dependencies, not
even DOM
• Webdriverio support
• Open source
• Support for various
framework
• Open source
• Parallel test running
• Bundled with JSDOM to
enable DOM testing
• Testing react native
apps.
• Automates browsers
• Remote control
• Easy set up
• Functional testing
• Easy to scale
• Recommended for large
projects
Cons • Cant run against the
‘real’ DOM.
• No reliance on its real
application or DOM.
• Doesn’t support image
comparison
• Too many unexpected
errors
• Longer time to
configure
• Less tooling and library
support
• Difficult to use across
board for larger projects
• Just facilitates internet
based applications
• Challenging to check
image based software
• Doesn’t supply any built-in
IDE
Intergration • Karma • Reac.js
• Karma
• No integrations yet • Selendroid
• Buddy
• Nemo.js
15. CHOSEN TESTING TOOLS
CS415 Advanced Software Engineering
14
Jasmine Framework
• The developers at Pivotal Labs for Jasmine previously developed a similar unit testing framework called
JsUnit before active development of Jasmine.
• It’s a Behavior Driven Development Framework for testing JavaScript code.
• It does not depend on any other framework.
• It does not require DOM and has a clean, obvious syntax so that you can easily write tests.
• Will be used for our frontend.
16. HOW TO USE
CS415 Advanced Software Engineering
15
Jasmine Framework
Jasmine is a framework for writing code that tests your code. It does that primarily through the
following three functions: “describe”, “it” and “expect”:
• describe() defines a suite of tests (or “specs”)
• it() defines a test or “spec”, and it lives inside a suite. This is what defines the expected behavior
of the code you are testing.
• expect() defines the expected result of a test and lives inside of it().
17. CS415 Advanced Software Engineering
16
PHPUnit Testing
Defining & Running Tests
Testing JSON APIs
• Create test case.
• Run your tests.
• Lumen provides API’s.
• Test to make a post request to /user.
19. SUMMARY
CS415 Advanced Software Engineering
18
• The importance of automated software tools.
• Why the chosen testing tools were the right choice for our group.
• Next step from here.