Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Basic Iphone Application DevelopmentBlock-5

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

Block - 5

Testing
The Objective:
At the end of this topic, the student will be able to know:

• What is Testing?
• Testing Types
• Testing Methods
• Unit Testing
• Testing App on a Device
• Publishing App on App Store
What is Testing?
• Testing is the process of evaluating a system or it’s components
• It checks the system satisfies specific requirement or not
• It keeps track on actuals and expected
• Testing is a executing a system to identify missing requirements
Who does testing?
• It depends on the process and the associated stakeholders of the project(s). In
the IT industry, large companies have a team with responsibilities to evaluate
the developed software in the context of the given requirements. Moreover,
developers also conduct testing which is called Unit Testing. In most cases,
following professionals are involved in testing of a system within their
respective capacities:

• Software Tester
• Software Developer
• Project Lead/Manager
• End User
Who does testing?
• Different companies have difference designations for people who test
the software on the basis of their experience and knowledge such as
Software Tester, Software Quality Assurance Engineer, and QA
Analyst etc.

• It is not possible to test the software at any time during its cycle.
When to Start Testing?
• An early start to testing reduces the cost, time to rework and error free software that is
delivered to the client. However in Software Development Life Cycle (SDLC) testing
can be started from the Requirements Gathering phase and lasts till the deployment of
the software. However it also depends on the development model that is being used.
For example in Water fall model formal testing is conducted in the Testing phase, but
in incremental model, testing is performed at the end of every increment/iteration and
at the end the whole application is tested.

• Testing is done in different forms at every phase of SDLC like during


Requirement gathering phase, the analysis and verifications of requirements are also
considered testing. Reviewing the design in the design phase with intent to improve
the design is also considered as testing. Testing performed by a developer on
completion of the code is also categorized as Unit type of testing.
When to Stop Testing?
• Unlike when to start testing it is difficult to determine when to stop testing,
as testing is a never ending process and no one can say that any software is
100% tested. Following are the aspects which should be considered to stop
the testing:

• Testing Deadlines.
• Completion of test case execution.
• Completion of Functional and code coverage to a certain point.
• Bug rate falls below a certain level and no high priority bugs are identified.
• Management decision.
Testing Types
• Manual Testing
• Automated Testing
Manual testing
• This type includes the testing of the Software manually i.e. without
using any automated tool or any script. In this type the tester takes over
the role of an end user and test the Software to identify any un-expected
behavior or bug. There are different stages for manual testing like unit
testing, Integration testing, System testing and User Acceptance testing.

• Testers use test plan, test cases or test scenarios to test the
Software to ensure the completeness of testing. Manual testing also
includes exploratory testing as testers explore the software to identify
errors in it.
Automation testing
• Automation testing which is also known as Test Automation, is when
the tester writes scripts and uses another software to test the software.
This process involves automation of a manual process. Automation
Testing is used to re-run the test scenarios that were performed
manually, quickly and repeatedly.

• Apart from regression testing, Automation testing is also used to


test the application from load, performance and stress point of view. It
increases the test coverage; improve accuracy, saves time and money
in comparison to manual testing.
Testing Methods
• Black Box Testing
• White Box Testing
• Gray Box Testing
Black Box Testing
• The technique of testing without having any knowledge of the interior
workings of the application is Black Box testing. The tester is
oblivious to the system architecture and does not have access to the
source code. Typically, when performing a black box test, a tester will
interact with the system's user interface by providing inputs and
examining outputs without knowing how and where the inputs are
worked upon.
White Box Testing
• White box testing is the detailed investigation of internal logic and
structure of the code. White box testing is also called glass testing or
open box testing. In order to perform white box testing on an
application, the tester needs to possess knowledge of the internal
working of the code.

• The tester needs to have a look inside the source code and find
out which unit/chunk of the code is behaving inappropriately.
Grey Box Testing
• Grey Box testing is a technique to test the application with limited
knowledge of the internal workings of an application. In software
testing, the term the more you know the better carries a lot of weight
when testing an application.
Unit Testing
• Smallest piece of testable software in the application
• Each unit is tested separately before integrating them
• Unit testing has proven its value in that a large percentage of defects
are identified during its use.
Unit Testing
• 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 testing has proven its value in that a large
percentage of defects are identified during its use.

• The most common approach to unit testing requires drivers and stubs to be written.
The driver simulates a calling unit and the stub simulates a called unit. The investment of
developer time in this activity sometimes results in demoting unit testing to a lower level
of priority and that is almost always a mistake. Even though the drivers and stubs cost
time and money, unit testing provides some undeniable advantages. It allows for
automation of the testing process, reduces difficulties of discovering errors contained in
more complex pieces of the application, and test coverage is often enhanced because
attention is given to each unit.
Unit Testing
• For example, if you have two units and decide it would be more cost
effective to glue them together and initially test them as an integrated
unit, an error could occur in a variety of places:

• Is the error due to a defect in unit 1?


• Is the error due to a defect in unit 2?
• Is the error due to defects in both units?
• Is the error due to a defect in the interface between the units?
• Is the error due to a defect in the test?
Logic Test
• Logic tests check the correct functionality or logic of code
components without interfering with the application flow. These tests
ensure that code works perfectly at the core level, i.e. methods or
class. These tests can be used to test the fundamental units, which
make up the application. These tests help us produce robust code that
works correctly when used in ways that you did not anticipate. Logic
tests have to be written in a way that covers all scenarios possible.
Application Tests
• Check the functionality of a code component in a running application.
• Application tests require a device to be executed.

• Application tests check the functionality of a code component in a


running application. We can use application tests to check if the
connections of IBOutlets and IBActions are intact, and the controller
has the reference of all the model objects that it should have.
Typically a test case can be written to check whether the model
objects are not ‘nil’. Application tests require a device to be executed.
Testing App on a Device
• Development Certificate
• Device Id
• App Id
Development Certificate
• It is License from Apple to Test iOS Application on a Device or to
Distributing Application to the Apple App Store. To get Developer
Certificate we have to register from apple developer site.
Device Id
• It is a unique id for the device, which you are using for the application
testing. To get this id go to iTunes Developer site. Once you get device
id then this device can run your application
App Id
• It can identify a specific application or application domain. This id
allows the application run on a device
Development Certificate
1. Open the browser
2.Type developer.apple.com in address bar press enter
3.Go to iOS Dev Center
4.Login to site using developer account
5.Click on iOS provisioning portal
6.Click on certificates
7.Click on Request Certificate
8.Choose the key chain file
9.Click submit
10.Download and install developer certificate on your system
Device Id
• Locating an Unique Device Id (UDID)
• Adding Individual Device
Device Id
1.Connect your iPhone to the system
2.Open xcode
3.Go to window
4.Click on organizer
5.You can see the iPhone identifier
6.Copy and go to developer site
7.Click on device option
8.Click on add device
9.Enter the device name and id
10.Click submit
App Id
• Generating App Id
• Using App Id for running Application on a Device
Running App on Device
• Create new project
• Open build settings
• Go to code signing
• Under debug select iPhone Developer Certificate
• Choose iPhone device
• Click on run
• You can see app running on Device
Application Distribution
• Distribution Certificate
• Provisioning Profile
• Uploading App to the App Store
Distribution Certificate
1.Go to developer web site
2.Login to web site using developer mail
3.Click on Provisioning
4.Click on Distribution
5.Choose key-chain file
6.Click on submit
7.Download and install distribution key
Provisioning profile for distribution
1.Click on provisioning
2.Choose distribution
3.Click on new profile
4.Enter profile name
5.Choose App Id
6.Click submit
7.Download and install provisioning profile
Uploading app to the app store
1. Go to xcode
2. Open project for distribution
3. Goto info
4. Click on add button
5. Enter distribution
6. Open build settings
7. Goto code signing
8. Select distribution certificate
9. Click run
10.It will create app for distribution
11.Goto app folder and create zip file
12.Create screen shots
Uploading app to the app store
13.Go to iTunes apple developer site
14.Login using apple developer credentials
15.Click on manage your applications
16.Click on Add New App
17.Enter App name
18.Click on continue
19.Select available date
20.Click on continue
21.Enter version information
22.Choose the screen shots
23.Click on save
24.Click ready to upload binary
Uploading app to the app store
25.Click save and continue
26.Download application loader and install it
27.Open application loader
28.Click on deliver your app
29.Click on next
30.Choose app zip file
31.Press on send
32.It will upload your app (first code will be reviewed by apple, if code
ok your app will be available on app store)
Thank You …

You might also like