Software Testing by Nithinbob
Software Testing by Nithinbob
Software Testing by Nithinbob
happened after it occurs. Tester can only find out the failure
VERIFICATION is to check whether the software conforms to specifications. It is done in various phase while developing the software.
SIGNIFICANCE OF TESTING:
As a result of communication gap between the user and requirement analyst, the software would not have been developed as per the user needs. Due to the communication gap between the developers, when a large number of developers work on the project, the complete functionality required would not have been implemented. The individual programmer should be expert in coding. otherwise it may lead to defective code. After the developer has developed the software, the software must be tested by the test engineer before delivering it. Software must ensure that security, privacy and safety of user and user data are taken care by rigorous testing. The software should be developed in hurry and quality should be maintained because of the clients pressure. Due to the clients budget problem, the developer will compromise with the quality of the software.
TESTING CHOICES:
A software/IT organization has two choices to do testing. Inhouse testing. Out sourcing testing.
In inhouse testing, The intellectual property will not be given out to 3rd party. The management will have total control over time and budget. Test engineer can interact with the developer on need basis.
In Outsourcing, It will be having a large number of human resource environments. It results in lot of cost saving. Testing is done faster in this method.
INTEGRATION TESTING(interface b/w the modules) BUDDY TESTING(2 people sit together n does testing) When an independent test engineer wants to test the software he must consider these points,
He should have an excellent knowledge of the application domain and also study all the work products like SRS, design document etc.
To review the code he should be familiar with the programming language and the source code.
Test engineer need to contact and interact with the developer to come out with a good testing strategy.
Test engineer need to tell the developer that their software has problems but in a very polished way.
V-MODEL:
USER NEEDS
ACCEPTANCE TEST
SRS DOCUMENT
SYSTEM TESTING
DESIGN
MODULE TESTING
UNITs/COMPONENT
The user needs are converted into user requirements. Based on the user requirement, the SRS document has to be prepared. Base on that SRS document, the design is carried out and the design document is made.
Based on the design, the different modules are designed and each module is further divided into units/components.
Each unit/component should be coded and tested. The components are integrated into modules and these modules are tested.
Then the modules are integrated into system and a system testing is done to ensure that the software is as per the user requirement.
Then the Acceptance testing is done to check whether the software meets the entire user requirement.
After the software has been installed, operational testing should be done to check user side errors that may occur when the software is used.
Functional requirement specify what the software does, here the results are obtained through the software have to be compared with the existing requirement document. Nonfunctional requirement are generally divided into 3 types,
The engineer will choose which of these nonfunctional requirements are suitable for the software and only those will be mentioned in SRS document.
TESTING STRATEGIES:
There are two types of testing, In static testing, The code is checked without executing it. Static testing is done through code reviews which are carried out formally and informally. The programmer and its team must study the code and check for errors. And he must ensure that the software is as per the user requirements. In dynamic testing, The code is executed and tested. The code is compiled executed with the help of inputs. Is the actual result match with the expected result then the software considered as ok. This can detect more errors than the static testing where in static testing code is tested without executing it. Static testing. Dynamic testing.
TEST CASES:
A test case consisting of test inputs. It has mainly 4 criteria, Test inputs. Entry criteria. Expected result. Exit criteria. Test inputs include giving input to a system. Entry criteria involve condition before the inputs are executed. Exit criteria involve condition after the inputs are executed. Entry Test inputs
Executable code
Number of test cases is selected and it is executed, then the test result is compared with the actually expected result.
For example, we consider a program that inputs a filename. Input type: file1.txt Entry criteria: file1 should not exist in the current directory. Expected result: file1 should be saved in the current directory. Exit criteria: the program should terminate without any errors and the file should be available in current directory.
Designing test case is still a creative activity to find out the all possible bugs.
Repeat the entire process for all the test cases. The disadvantage of manual testing is the repeating process. The automated testing is a software testing tool which is going to test the software with the help of testing condition.
In unit/ component testing, It is the smallest entity in the software. Every unit has to be tested and executed separately to check whether it is as per the user requirement or not. Unit testing can only be done by the development engineers.
In module testing, A module is an independent entity in software. When the units are integrated into modules, each module has to be tested as per the user requirements.
In integration testing, The interface between the modules is checked. Integration test has to be done step by step.
In system testing, The complete design of the software has to be checked as per the user requirements. SRS documents have to be checked as per the functional and
nonfunctional requirements given by the clients. In acceptance testing, It is done at the client/user side. Here the test engineer should test the software in actually user
environment.
Is the actual result match with the expected result then the software considered as ok
This can detect more errors than the static testing where in static testing code is tested without executing it.
functionality of the modules is also tested. Structural testing involves, Each and every statement is executed and tested at least once as per the user requirement. Here inputs are given in such a way that it is going to check all part of the code. Each path is executed once. Each function should be called once.
TYPES OF TESTING:
SMOKE TESTING: When the modules are integrated and software is ready to use, then some basic functionality of the software is tested. BLACK BOX TESTING: In black box testing, the functionality of the software is tested without considering the implementation and execution. In this testing, we must ensure that each and every functionality of the software has been checked as per the user requirements.
WHITE BOX TESTING: In white box testing each and every part of the code is tested. We must ensure that every statement has been executed at least once. It also specifies the internal logic of the program.
INTERFACE TESTING: It is done to ensure that the interface / interconnection between the two modules are correct. H/w to h/w interface: it is done to ensure the interface between the two hardware components. S/w to s/w interface: is to ensure the interconnection between 2 different softwares. H/w to s/w interface: is to ensure that how the hardware interact with a software. Human computer interface: where all GUI elements are tested.
GORILLA TESTING: Gorilla testing is used to test the software by pressing some keys randomly. Gorilla testing is done just like an animal which is using the software and does not knows anything about the software. It is used to check whether any defects occur when wrong inputs are given. BETA TESTING: Beta testing is done by the client/ user in the absence of developer team. It is mainly based on the usability and performance of the software. In beta test, following test plans are made, The number of beta test suites.
The environment required for beta testing where exact h/w and s/w configurations has to be specified.
The help line has to be specified and worked out. Whether the beta test service is priced or free. Beta testing is actually done when development and testing is finished and final defects and problems need to be found by the test engineer as a user as before the final release.
STRESS TESTING: Stress testing is done to evaluate the system beyond the limits of specified requirements. It mainly focuses on how the software behaves in extreme conditions.
CONFORMANCE TESTING: Conformance testing ensures that the project meets all the standards that are defined by some of the standard bodies. The standards are specified to provide, Interoperability among different vendors. Safety to the user. Compatibility with the government regulation. Special feature like disabling the software. Privacy to the user. Security to the user.
SECURITY TESTING: Security testing is done to ensure that the software can defend all the attacks or not. It is highly specialized activity so you need to think like a thief to catch a thief. During this test, test engineers concentrate on following factors, Authorization: whether a valid user is accessible or not and an invalid user is preventable or not. Access control: whether a valid used has permission to use specific service or not. Encryption: is to convert the conversation between client and the server to prevent third party access.
It ensures that all the coding guidelines are followed so that the maintainability of the software becomes easier.
Time effort and cost factors are checked to reduce the estimation and to increase the productivity along with quality.
2] IDENTIFY THE REVIEW TEAM: The project manager has to review a team consisting of, AUTHOR: author of the project is specified. REVIEWERS: two or more reviewers have to be set who has an expert knowledge over any kind of software. SECETORY: to maintain and store all meeting details and important points discussed during the meeting. MODERATOR: responsibility is to complete the meeting without any harmful arguments between the author and reviewers. MANAGER: manager is one who identifies and plans review meeting.
3] PLAN THE MEETING: Once the review team is ready, then following activities starts, PREPARATORY ACTIVITIES: the relevant document about objectives and agendas of project is distributed to every member of the team. ACTUAL REVIEW MEETING: in this meeting, a designated person will explain the product and necessary issues are discussed. REWORK: action points are defined and errors are rectified by the author.
CHECKLISTS:
The lists that are used to check all the requirement specification of the software. The check list has to be prepared and the work product should be checked by the review team.
SRS CHECKLISTS:
Is there any ambiguity in the SRS document because of the natural languages? Are the user requirement is covered in the document or not. Is every functional and nonfunctional requirement is specified in the document or not. It is easy to make changes in the SRS document. Is that SRS is usable during the remaining stages of development. Is SRS is validated by the client or not.
DESIGN CHECKLIST:
Is every functional requirement is specified or not. Are the performance requirements are met. Are the design constraints are met or not. Are the external interface is specified. Is error handling taken care. Is the help engine designed and integrated. Are the chosen algorithm is correct. Are data structures are identified.
GUI CHECKLISTS:
Is the application starting when the icon is double clicked. Is the application starting twice when the application icon is double clicked twice. Is every window having the correct title.
Do all the screens have good look and feel. If a wrong input is given to the application, and then is an error message is displayed.
WEBSITE CHECKLISTS:
Does the website works exactly in the same way for all the web browser. Is every link is checked. Is the content getting downloaded in max 10 seconds. Is there a site map. Is there a search option. Is accessibility to disabled provided?
C CODING GUIDELINES:
Some guidelines for C programming is, For every project there should be a folder that contains all code files. The backup of the project folder should be made. Every file should contain a header that gives the copyright information, name of the file, author. All the variables, functions, structures should have meaningful names. Online document should be relevant. the source
EQUIVALENCE CLASS 2: The equivalence class 2 contains all the possible invalid inputs which are defined by the test cases. So if one test case in an equivalence class 2 fails then every test case should get failed.
partitioning. Rather than selecting any element from class of data, BVA leads to the selection of test cases at the edge of class. For example, For a program where marks has to be inputted. The boundary value for marks is 0 to 100. Here the input which is within 0 to 100 should be accepted. And inputs below 0 and above 100 should not be accepted.
And all the possible test cases for the above problem is shown below, TC1: Correct account number, signature matches, enough money. TC2: Correct account number, signature matches, not enough money. TC3: Correct account number, signature does not matches, enough money. TC4: Invalid account number, signature matches, enough money.
ON
OFF
1 digit 2 digit s
3 digit s
The above STD specifies, In PBX call office, when we dial correct 3 digit number, the call is established and conversation is carried out. Some of the test cases for this example are as follows, TC 1: go offline and disconnect. TC 2: go offline, dial 1st digit and disconnect. TC 3: go offline, dial 2nd digit and disconnect. TC 4: go offline, dial 3rd digit and disconnect. TC 5: go offline, dial 3 digits, disconnect after conversation.
STRUCTURAL TESTING:
STRUCTURAL TESTING AT MODULE LEVEL: In structural testing, when the units are integrated into modules then the modules are tested for its performance over other modules. Here the modules structure is considered mainly. For example consider software for banking. Here account is an abstract class and savings, fixed, and current account are the derived class. For above example, the structural testing will create objects for only savings, fixed, and current account which is derived. STRUCTURAL TESTING AT SYSTEM LEVEL: When you interconnect modules and develop the complete system, you will know how the modules are interconnected and hence using that information, testing is done.