Engineering

Software Design methodologies and Testing BE Computer (2012 Course) Endsem December 2017



BE Computer (2012 Course)

Semester-2, Dec 2017

Software Design methodologies and Testing

Time: 2:30 hour                                                                            Marks: 70

 

Q1) a) Explain Aggregation, Composition and Generalization with reference to class diagram. (5 marks)

Ans:

Composition and aggregation:

  • The object attributes and relationships are identified. In some cases identified class is made up of other classes. Such relationship is called as composition and aggregation relationship.
  • Let take example of a college class which composed of classes like department, office. So we can say that department is a part of college.
  • In another example mobile phone contains processor, battery. So we can say that battery is part of mobile phone.
  • Example 2 is an example of composite relationship. Both examples show the weaker relationship between classes.
  • One college may contain multiple departments and closing one department will not close the entire college. So here we use aggregation relationship. Aggregation hierarchy is weaker version of whole relationship.
  • Figure shows the composition relationship and uses smartphone as composite class and its part to depict entire relationship.

Eg. Example of composition hierarchy

  • Following figure represents aggregation hierarchy where college is aggregate class. Aggregation specifies “has a relationship”. So college has a T&P department.

Fig. Example of aggregation hierarchy

  • Generalization is type of parent and child relationship between the classes where child inherits attributes of the parent. Generalization and specialization represent inheritance relationship. A class get generalized when we go upward from child to parent.
  • In the following figure most abstract class is college employee and it has attributes like teaching staff etc.

Fig. Generalization/Specialization hierarchy

 

Q1) b) Explain the fundamental design concepts applied in modern software design.(5 marks)

Ans:

  • Software design refers both the process of designing and the design product.
  • Design process is one which involves creativity. A skilled and experienced architect needs to be creative while developing software strategies.
  • A design process describes the sequence of steps through which the architect of software is proceeded to design solution.

Fundamental design concepts:

  • Abstraction:

Basic system is developed with relevant information and does not include complexities of the system.

  • Refinement:

Once higher level design is complete then refinement starts with the design which reaches to the low level programming like interfaces, classes etc.

  • Modularity:

Design is divided into module. Input, output is defined for the module and if needed team is assigned to work on that module in isolation.

  • Software architecture:

Software architecture is important and always referred throughout the lifetime of system. Good software architecture ensures good return of investment for the stockholders.

  • Control Hierarchy:

Flow of control and data is important. Different stages of user interaction and the subsystem interaction can be used to show control hierarchy at high level.

Q2) a) What is Unified modelling language (UML)? List few standard notation and diagrams of UML.  (5 marks)

Ans:

  • UML is a standard modelling language and notation for object oriented analysis and design.
  • Notations are used to visualize the design of system.
  • It is widely accepted in software development organization.
  • It is contributed by Grady Booch, Ivar Jacobson and Rumbaugh.
  • UML based software architecture and modelling design method is COMET(Concurrent Object Modelling and Architecture Design Method).
  • Following diagrams are supported by UML:
  1. Activity Diagram
  2. Class Diagram
  3. Sequence Diagram
  4. Deployment Diagram
  5. Use case Diagram etc.

Q2) b) What extension points in use cases? Explain with proper use case description and diagram. (5 marks)

Ans:

  • Extension point represents the precise location in base use case where extension are added.
  • Name is provided to every extension point.
  • It should be inserted in base case where extensions are added.
  • In lecture subsystem of university detail, the base use case is update lecture details and mark attendance is sensible extension point where two extensions are added which are mark online attendance and mark OTA attendance.

Fig. Use case for extend relationship

Q3) a) Explain the concept of generalization and specialization of class hierarchies using suitable examples and class diagram.  (5 marks)

Ans:

Generalization:

  • Generalization/specialization is used to show parent-child relationship.
  • Child can have its own additional attributes and operations but it makes use of parent’s attributes and operations.
  • Generalization means child is substitutable for declaration of parent. Child overrides the implementation of parent.
  • Let take example, parent may define display method for displaying some message while child triangle may use same method name display to display the area of triangle. This overall mechanism of overriding the operation is also known as polymorphism.
  • It is also called as “is-a-kind-of” relationship.
  • Generalization is represented by solid line with unfilled triangular arrowhead.
  • In the following figure most abstract class is college employee and it has attributes like teaching staff etc.
  • The teaching staff is child class and it has all attributes and capabilities of parent. Also it has unique attributes like graduation degree.

Fig. Generalization/Specialization hierarchy

Q3) b) What is iterator pattern? Explain one example scenario where you will iterator pattern to get applied. (5 marks)

Ans:

  1. Iterator pattern
  2. Characteristic:
  • Client can iterate through objects without showing the internal architecture of aggregate object.
  • We can iterate objects in many ways depending on application requirements.
  • It is also called as cursor pattern.
  • We can access the elements of aggregate object sequentially.

 

  1. Consequences:
  • It provides easy interface to aggregate object.
  • We can traverse the element of aggregate object. According to requirements of application and type of data structure, the traversal mechanism is decided.
  • Some condition allows more than one traversal on aggregate object.

 

  1. Applications:
  • We can use iterator pattern in library management system.
  • Iterator design pattern is also used in java and .net programming.

Example:

Let take an example of phonebook contact application which maintains list of contacts by contact with name of person.

  • Iterator: It is an abstract iterator which describes iterator operations.
  • I container: It is an interface describes aggregate.
  • Contact iterator: It is implementation of iterator which implements I iterator.
  • Contact collection: It is an implementation of collection.

Fig. Class diagram for phonebook with Iterator pattern

Q4) a) What is software architectural pattern? Why are they important in modern software development? Explain in brief. (5 marks)

Ans:

  • Now designing each module from scratch is resource consuming. We realized that some type of problems can be solved using common design strategy. Context and application of software system may different but same design strategy can be used.
  • Design strategy contains well defined design specifications called as design pattern.
  • Design patterns are applied while designing and coding.
  • It makes the work of developer much more disciplined and less time consuming.
  • Thus applying the design pattern at the time of designing and implementation reduces the risk of failure and helps in quality of software development.

 

Q4) b) What are important design principles for service oriented architecture? (5 marks)

Ans:

Design principles for service:

  • Abstraction:

Here the complexities are hidden from service consumers. Service provides only interface to access the service and hides the internal details.

  • Loose coupling:

Each service design in such a way that it should be independent of other.

  • Reusability:

The main goal of SOA is to design the reusable service so that it should be reused among several clients.

  • Service contract: It describe well defined service interface that consumer should be aware of. It describes what inputs is required to get the expected output.
  • Autonomy:

Service should be design in such a way that it should be autonomous and work without any dependency.

  • Discoverability:

Service should support an external procedure through which it is discovered. It should define the service discovery.

  • Statelessness:

Service should not know the client activity and should not depend on client state. For each service, all clients must appear similar remaining in same state.

Q5) a)Explain V test model with suitable block diagram. (8 marks)

Ans:

  • It is software development model and extension of waterfall model. It forms a V shape to bend upwards after coding phase and define testing, verification, validation against each development phase.
  • First it defines high level of business requirements from client point of view. System design starts when system requirements are specified. High level software design illustrates system in the form of subsystem with interconnection and interfaces.
  • In Low level system design, high level system design is refined to include smaller details. Design patterns are applied and properties as well as operations of each module are identified.

Fig. V model with its different phases of testing

  • In coding phase, algorithms are written in programming languages. Coding results in small units of programs that tested individually. Programs logic is checked.
  • With low level design phase, integration testing is performed. Interoperating and integrated sub-system are tested by integration testing.
  • At last in acceptance testing, the software is tested to ensure that it meets the customer requirements. It makes sure that the product is acceptable by user and meets the user environments.
  • At every development stage at left side of V model, test design activities are included and their execution lies on right side in upward direction.
  • Developers and system architects are actively involves in testing activities and for each design activity, they design tests or co-operate with test engineers for designing tests.

Q5) b) What are different advantage and disadvantage of validation. (8 marks)

Ans:

Advantages of Validation:

  • If some defects are missed during verifications then at this stage they are marked as failures.
  • The difference between actual result and expected result can be understood during validation testing.
  • It is done at integration testing, system testing, stress testing etc.
  • It is easy to implements.

Disadvantages of Validation:

  • Stubs are drivers are required in unit and module testing, therefore they needs an extra efforts of development and testing before they can be used.
  • If defects are not found during testing then we can say that no defects actually executed. There can be several new defects may not captured by these test cases.
  • It may result into redundant testing while sometime tester may not aware about the internal structure and code gets executed repeatedly.
  • Some library functions we use several time during execution and they tested each time because tester is unaware of same function is executing repeatedly.

Q6) a) Explain the cases and effects of defect. (8 marks)

Ans:

Cases associated with defects:

  • Defects per 100 test cases

Defects per 100 test cases = (Total defects found for a period/ Total test cases executed for same period) * 100

  • Defects per 100 hours of testing

Defects per 100 hours of testing = (Total defects found in the product for a period/ Total hours spend to get those defects) * 100

  • Defects per 100 failed test cases

Defects per 100 failed test cases = (Total defects found for a period / Total test cases failed due to those defects) * 100

 

Effects associated with defects:

  • Phase to phase, quality of product increases if defect found and rectified in early stage.
  • Most of the defect found in Unit and component testing. Therefore, successful completion of both testing phases increases the confidence level of testing.

Q6) b) Explain the defect management process with suitable block diagram. (8 marks)

Ans:

Steps in defect management process:

  • Defect Identification:

It is process of detecting the defect. A person detecting the defect belongs to testing team and in practical case that may be development team member, system analyst.

  • Defect categorization:

When defect is identified and reported, it is given to team to ensure its existence and identify its nature.

  • Defect Prioritization:

Defect is prioritized on the basis of relative effort to fix and severity of impact on end user.

  • Defect Assignment:

Defect is assigned to developer to fix it. Developers make use of defect management tool for tracking the activities.

  • Defect Resolution:

After resolving defect, responsive actions are taken by organization to propagate the fix to environment where defect occur.

  • Defect verification: After fixing the defect, testing team verifies that fix has exactly cures the defect. After verification it is applied on the system.
  • Defect Closure:

After fixing and verifying the defect, it is marked as closed.

  • Management reporting and analysis:

Reports are generated for fixed bug and send to the stockholders as needed.

Fig. Defect Lifecycle

Q7) a) Briefly explain different types of functional system testing. (6 marks)

Ans:

Types of functional system testing:

  • Design verification:

According to the design and architecture of system, test cases are developed. It focuses on behaviour of product.

  • Business vertical testing:

It is related to product which automates different business activities of organization such as payroll, banking system etc.

It automates the workflow of organization and testing requires knowledge of business verticals.

  • Deployment testing:

It makes sure that the customer’s deployment requirements are met. It conducted after release of product and in user environment.

  • Beta testing:

Beta testing is performed when there is high risk of product rejection and continuous feedback is needed by customers in final stage. Product under testing is sent to the customer t collect feedback based on its use.

  • Compliance, standard and certificate testing:

After development, system needs to be certified with its hardware and different platform dependent software. Famous compliance testing are 508 accessibility guideline which makes any software usable for physically challenged users, SOX(Sarbanes- Oxley’s Act) places the requirements of product audit to avoid financial fraud in company.

Q7) b) Explain graph based testing with example. (6 marks)

Ans:

  • It belongs to block box testing and useful when system is represented in the form of data flow model, where data flows from one state to another.
  • Also when system is a language processor like compiler and interpreter and represented in the form of state machine.
  • It is useful when system transaction can be depicted as state transitions.
  • Let’s take an example of admission system where the steps to be performed are:
  • Fill online admission form.
  • Student appears in admission test.
  • Based on exam performance result declared as selected or rejected.
  • Student reaches to CAP centre for admission.

Fig. Example of state graph

Q7) c) What is security testing? Explain different types security testing. (6 marks)

Ans:

 

Security testing:

  • It is performed to find out the security flows in security process of system.
  • It helps in protecting the application from different attacks and protects the important data.

Types of security testing:

  • Penetration testing: In this, tester has to find possible ways of how to destroy the system while testing.
  • Ethical hacking: In this, system is attacked from within to expose security flaws in the software while testing.
  • Vulnerability testing: Entire system is scanned to find out the loopholes and vulnerable conditions.
  • Risk assessment: It performs with security testing and risk is categories into Low, Medium, High risk.
  • Security review: It checks whether all the standard are followed and system implemented properly or not through design review.

Q8) a) Differentiate between white box and black box testing. (6 marks)

Ans:

Sr. No. White Box Testing Black Box Testing
1. Programming knowledge is required to perform. Programming knowledge is not required.
2. The main objective is to check the quality of the code. The main objective is to check functionality of the system.
3. It is done by tester and developers.
It is done by end user, developer, and tester.
4. Granularity is high. Granularity is low.
5. It is exhaustive and time-consuming method. It is less exhaustive and time-consuming.
6. It is best suited for algorithm testing. It is not the best method for algorithm testing.
7. Testing is applicable on lower level of testing like Unit Testing, Integration testing.
Testing is applicable on higher levels of testing like System Testing, Acceptance testing.
8. Implementation Knowledge is required. Implementation Knowledge is not required.

 

Q8) b) Explain regression testing. (6 marks)

Ans:

Regression testing:

  • It verifies software the developed and tested earlier still performing the same after the modifications with other software.
  • Software enhancement, configuration changes may contain in modifications. Regression testing may discover new bugs.
  • To check the affected area after changes, a software change impact analysis is done.
  • Regression testing ensures that changes performed have not created any new bug.
  • Regression testing resolve whether a change in one part of software changes other parts of the system.

Q8) c) What is testing? List the benefits of unit testing. (6 marks)

Ans:

  • Testing is a set of procedure which describes software testing approach in software development life cycle.
  • Each organization defines its testing strategies on software development.

Benefits of unit tests:

  • Valuable documentation:

Proper documentation is made while performing unit testing. The program behaviour is observed. Documentation helps in later stages of testing.

  • Provide scope for change:

Programmers are allowed to change library and code to make their code work properly.

  • Contribution in good designing:

Test cases of unit testing helps in good designing.

  • Early detection of software defects:

Unit testing is performed as soon as programs are developed.  Normally, test cases in unit testing are designed before the programming starts, but the code is considered as complete only when it passes the unit testing.

  • Simples integration testing:

All the programs units are tested before integration testing.

Q9) a) What is functional testing? Explain its types. (8 marks)

Ans:

Functional Testing:

  • It is verification of the tasks that system is supposed to perform.
  • It does not depend on environment of system and have simple methods for test case execution.
  • It verifies whether requirements are as per the client expectation or not.

Techniques to perform functional testing:

  • Design verification:

According to the design and architecture of system, test cases are developed. It focuses on behaviour of product.

  • Business vertical testing:

It is related to product which automates different business activities of organization such as payroll, banking system etc.

It automates the workflow of organization and testing requires knowledge of business verticals.

  • Deployment testing:

It makes sure that the customer’s deployment requirements are met. It conducted after release of product and in user environment.

  • Beta testing:

Beta testing is performed when there is high risk of product rejection and continuous feedback is needed by customers in final stage. Product under testing is sent to the customer t collect feedback based on its use.

  • Compliance, standard and certificate testing:

After development, system needs to be certified with its hardware and different platform dependent software. Famous compliance testing are 508 accessibility guideline which makes any software usable for physically challenged users, SOX(Sarbanes- Oxley’s Act) places the requirements of product audit to avoid financial fraud in company.

Q9 b) What are different required features in automated testing tools and explain them? (8 marks)

Ans:

Required features in automated testing Tools

  • Variables are not hard coded in test suite

All the variables are stored in separate file so that test suite will not modified them each time and we can change the variables without modifying the code. Therefore, if the testers do not know the program still he can change the data in file and perform the test suits.

  • Test suite should be expandable

It describes that addition of any new test case should not affect the existing test cases and no need to check whole test suite.

  • Features of automatic setup and clean-up

Each test case requires some setup to be done. System should be configure for setup and after setup the test is executed and previous setup is discarded.

  • Automation tool should handle each test case independently

Test case should be independent from each other during its design and execution.

  • Selective execution of test cases

The automation tools should provide the facility of selecting specific test cases for execution amount the other test cases.

  • Support for report mechanism

After execution of test cases, there should be a process of generating the report of testing.

  • Programming language independence

Test automation tool should not depend on any programming language. It should provide choice to select between different programming languages.

  • Support for creating and maintaining proper directory structure

Automation tool should provide support for creating and maintaining proper directory structure which makes task of maintaining and executing test cases simple.

 

Q10) a) What are selection criteria of automated testing tool? (8 marks)

Ans:

Selection criteria of automated testing tool:

  • Meeting requirements:

The automation tool should fulfil all the requirements of organization. Tool itself should be defect free. It should provide latest updates. It should support forward and backward compatibility for technology.

  • Training of tools:

The vender should provide training of required level. Test team and development team should get benefited from training.

  • Business and management aspect:

Return of investment should be specified on various parameters. Also, tool deployment and migration is costly process therefore all factors should be considered while selecting the tool for test automation.

  • Technology expectations:

Tools should allow the developers to extend and modify its functionality up to some extent. Tool should provide some development API for extending its functionality. Tools Source code should be available. Automation tool should support cross platform operations.

Q10) b) Write shorts notes on:  (8 marks)

  • Monkey talk.
  • Selenium

Ans:

Monkey Talk:

  • It is functional testing platform for mobile applications.
  • It is easy to use and fast to test.
  • It can be conducted on real devices or simulator.
  • It supports HTML 5, hybrid and flex apps.
  • Monkey talks IDE, Monkey talk agent Monkey talk script are three components of monkey talk.
  • It is interactive test platform to conduct automated testing for application developed for android and iOS.
  • Tool is available in beta version for non-commercial use and limited free version for commercial use.
  • Monkey talk agent command can be executed, recorded as required.
  • Native monkey talk script or java script is used to write test.
  • Complete automation testing can be implemented using monkey talk.
  • Monkey talk allows integrating eclipse based development environment.

Selenium:

  • It is licensed under Apache.
  • It is open source test automation tool.
  • It is a tool to automate the browser.
  • It used in testing web application and gives automation of web administration.
  • It provides testing framework for web application.
  • In this, knowledge of test scripting language is not required. Selenium provides test domain specific language which used to design and write test cases.
  • Most of the web browser running projects to make selenium native part of their browser.
  • It available in IDE, API driver and framework.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *