Monday, 19 October 2020

ST two marks Q&A

 

ST two marks Q&A

Chapter -1

1) What is software testing?

       An inspection or study carried out determine the status of a client requirements with an aim to identify the bugs for the application under  test is ref erred to as Software testing. The term can be taken in a very light manner as it reflects but involves a real complexity for the term member who are part of this domain.

2) What is role of testing? Explain?

     
     Testers must have the following

              Good development background

                    Knowledgeable in informal language

                    Knowledgeable in graph theory and algorithms

   To plan and carry out tests,  testers must

              Consider the function of the software

   The inputs and their different combination

              The operating environment

3) Explain the principles of testing?

  All test must should be traceable to suit customer requirements.

  Test should be planned long before testing begins.

 The pareto principle can be applied to software testing (i.e)..,80% of all error uncovered during  testing is likely to become traceable to 20% of all program modules.

Testing should being  in a small way whereas the programs for testing should be conducting in a big way.

Exhaustive testing should be avoided. 
 To be most effective, testing should be conducted by an independent third party.

4)what is purpose of testing?

·         Testing consumed atleast half of the time and work required to produce a functional program .

·         MYTH: Good  programmers write code without bugs.

·         History  says that even well written programs may still have 1-3 bugs for every hundred statements.

5) Explain a model of s/w testing?

              The above figure is a model of testing process. It includes three models: A model of the environment,  a  model of the program and a model of the expected bugs.

6) Difference between functional testing and structural testing

       Functional testing, the program or system is treated as a black box. it is subjected to inputs, and its outputs are verified for conformance to specified behavior . Functional testing tasks the user points of view—it bothers about functionality and features and not about the program’s   implementation.

      Structural testing   does look at the implementation details, Aspects such as programming style, control method, source language, database design, and coding details dominate structural testing.


7) Discuss about Productivity and Quality in s/w.

           In production of consumer goods and other products, every manufacturing stage is subjected to quality control and testing, from components to final stage.

          Productivity is measured by the sum costs of the material, the rework, and the discarded components, and the cost of quality assurance and testing.


8) explain about various types of s/w testing

·         Functionality testing

·         Forced error testing

·         Compatibility testing

·         Performance testing

·         Scalability testing

·         Stress testing     

·         Usability testing


9) write short notes on dichotomies

        Many people consider both as same. The purpose of testing is to show that a program has bugs. The purpose of testing is to find the error or misconception that led to the program’s failure and to design and improvement the program changes that correct the error.

10) difference between testing and debugging.

                            Testing

                         Debugging

    Testing starts with known conditions, uses predefined procedures and has predictable outcomes.

   Debugging starts from possibly unknown initial conditions and the end cannot be predicted except statistically

   Testing  can and should be planned, designed and scheduled

   Procedure and duration of debugging cannot be so constrained

  Testing is a demonstration of error or apparent correctness

  Debugging is a deductive process

 

11) Explain model for testing

         The above figure is a model of testing process. It includes three models: A model of the environment,  a  model of the program and a model of the expected bugs.

12) Explain about system testing

         System testing concentrated on testing the complete system with varieties of techniques and method.

       system testing involves 2 kinds of activities:

              1. Integration testing        2. System testing

                                                               Chapter 2

1) Explain about importance of bugs.

 

         The importance of bugs depends on frequency, correction cost, installation cost, and consequences.

2) Discuss about consequences of bugs.

            The consequences can range from mild to catastrophic.

            A reasonable metric for bug importance is

                      Importance=($)= Frequency *(Correction cost+ installation cost+ consequential cost)


3) Explain about Taxonomy of bugs in details.


            There is no universally accepted way to categories bugs. The taxonomy is not rigid

            A given bug can be put into one or another category depending on its history and the programmers state of mind

      The major categories are:

·         Requirements , features and functionality bugs

·         Structural bugs

·         Data bugs

·         Coding bugs

·         Interface, integration and system bugs

·         Test and test design bugs

                                                                Chapter-3

 

1) Basic concept of path testing


           Path testing

          The bug assumption


  2) write short notes on path testing.


        Path is the name given to a family of test techniques based on judiciously selection a set of test                paths through the program.
       Path testing techniques are the oldest of all structural test techniques.

       Path testing is most application to new software for unit testing. It is a structural technique.

       It requires complete knowledge of the program’s structure. 

3) Discuss in detail about in control flow.

                 The control flow graph is a graphical representation of a program’s   control structure.  it uses the elements named process blocks, decision and junction .

                The flow graph is similar to the earlier flowchart, with which it is not to be confused.

4) Discuss about fundamental path selection criteria.

       1.  A minimal set of paths to be able to do complete testing.

       2.  Each passes through a routine from entry to exit , as one traces through it, is a potential path.

       3.  The above includes the tracing of 1….n times tracing of a interactive black each separately.

    Note : A bug could make  mandatory path not executable or could create new paths not related to processing.

5) complete path testing prescriptions:

·         Exercise every path from entry to exit.

·         Exercise every statement or instruction

·         Exercise every branch and case statement in each direction, at least once.


6) Discuss loop testing times in details


            Longer testing time for all loops if all the extreme cases are to tested.

            Unreasonably long test execution times indicate bugs in the s/w or specs.      

            The test time problem is solved by rescaling the test limit values.

            It can be achieved through a separate compile, by patching, by setting parameter values etc…

7) Write short notes on horrible loops

               A horrible loop is a combination of nested  loops, the use of code that jumps into and out of loops, intersecting loops, hidden  loops and cross connection loops.

              Makes iteration value selection for test cases an awesome and ugly task, which is another reason why structures should be avoided.

                                        Chapter-4

1) What is predicate?

                The logical function evaluated at a decision is called predicate. The direction taken at a decision depends on the value of decision variable.  some example are: A>0,x+y>=990…..


2) Path predicate?


             A path predicate associated with a path is called a path predicate . for example, “X is greater 
than zero”, “X + y>=90”, “w is either negative or equal to 10 is true” is a sequence of predicates whose truth value will cause the routine to take a specific path.


3) Discuss about multiway branches?


                The path taken through a multiway branch such as a computed GOTO’s , case statement , or jump tables cannot be directly expressed in TRUE/FALSE terms. Although, it is possible to describe such alternatives by using multi valued logic, an expedient is to i way. Branches as an equivalent set of if…then. else statements.

4) Predicate expressions


            Every predicate path leads to an associated Boolean expression, called the path predicate expression, characterizes the input values that will cause that path to be traversed.


5) Predicate interpretation in detail


                The symbolic substitution of operation along the path in to express the predicate solely in terms of the input vector called predicate interpretation.

 

6) Explain path predicate expression in detail


            Every predicate path leads to an associated Boolean expression, called the path predicate expression, characterizes the input values that will cause that path to be traversed..

             Select an entry/exit path. Write down un-interpreted predicates for the decision along the path. If there are iterations, note also the value of loop-control variable for that pass. Converting these into predicates that contain only input variable, we get a setoff Boolean expression called predicate expression…


7) Explain about Testing Blindness in details


                Testing Blinding is a pathological (harmful) situation in which the desired path is achieve for the wrong reason. There are 3types of Testing Blindness.

·         Assignment Blindness

·         Equality Blindness

·         Self Blindness


8) Path sensitizing


It’s the act of finding a set of solution to the path predicate expression.

In practice, for a selected path finding the required input vector is not difficult. If there is difficulty, it may be due to some bugs.


9) Path instrumentation


                 The outcome of a test is what we expect to happen as a result of the test.  Path instrumentation is what we have to do to confirm that the outcome was achieved by the intended path.


10) Single link marker instrumentation


Unfortunately, a single link marker may not the because link can be chewed by open bugs.

             We intended to traverse the ikm path, but because of a rampaging GOTO in the middle of the m, link we go to process B. if coincidental correctness is against us, the outcomes will be the same and we won’t know about the bug…..


11) Discuss about 2-link marker method


The solution to the problem of single link marker method is to implement two marker per link: one at the beginning of each link and on at the end. The two link markers now specify the path name and confirm both the beginning and end of the link.

                                                              Chapter-5        

 

1) What is Transaction flows?

Transaction is a unit of work seen from system’s user point of view. It consists of a sequence of operations performed by a system, persons or external devices. Transaction is created (birth) due to an external act and upto its (closure), it remains in the form of historical records.      


2) Explain about transaction flow graphs in details


Transaction flow graphs a behavioral (functional) model of the program (system) used for functional testing by an independent system tester. The method that were applied to control flow graphs are then used for testing. Transaction flow and transaction flow testing are to the independent system tester what control flows are path testing are to the programmer.


3) Uses of transaction flow




  1.   Transaction-flow meets the requirements of big, online and complicated system.
  2.   It is used in airline reservation system and air-traffic control systems.
  3.   Loops are less as compared to CFG. Loops are used input error processing.
  4.   The flows are represented by relatively simple flow graphs, many of which have a single straight –through path

4) Implementation of transaction flow



  1. Transaction flow is usually implicit in the design of system’s control structure and associate database.
  2.  No direct one-to-one correspondence between “process” and “decisions” of transaction-flow, and the corresponding program component.
  3.  A transaction-flow is a path taken by the transaction through a succession of processing modules.
  4.  A transaction is represented by a token.
  5.  A transaction-flow graph is a pictorial representation of what happens to the tokens.

5) Transaction flow structure



  1.    Processes involve human users
  2.    Part of  from external systems
  3.    Errors ,failures, malfunctions and recovery actions

6) Explain about Transaction flow testing techniques



  1. Transactions flows
  2.  Inspections, reviews and wall through
  3.  Path selection
  4.  Path sensitization
  5.  Path instrumentation

Chapter-6

 

1) Discuss Basics of Data Flow Testing.

Data Flow Testing(DFT) uses control flow graph (CFG) to explore dataflow anomalies. DFT is a family of test strategies based on selecting paths through the program’s control flow in order to explore the sequence of events related to the status of data objects.


2) Explain about Data Flow Machines.


There are two types of data flow machines with different architectures.

·         Von Neumann machines

·         Multi-instruction, multi-data machines(MIMD)


3) Explain about Data Flow Graphs in details.


The data flow graph is a graph consisting of nodes and directed links.

·         We will use control graph to show what happens to data objects of interest at that moment.

·         Our objective is to expose deviations between the data flows we have and the data flows we want.


4) Write short notes on Data Flow Anomalies.


An anomaly is denoted by a two-character sequence of actions. For example, ku means that the object is killed and then used, where as dd means that the object is defined twice without an intervening usage.


5) Explain about Data Flow Anomaly State Graph in detail.


Data flow anomaly model prescribes that an object can be in one of four distinct states:

·         K – undefined, previously killed, does not exist

·         D – defined but not yet used for anything

·         U – has been used for computation or in predicate

·         A – anomalous

These capital letters (K,D,U,A) denote the state of the variable and should not be confused with the program action, denoted by lower case letters.

 

6) Explain about strategies of Data Flow Testing.


The structural test strategies discussed below are based on the program’s control flowgraphs. They differ in the extent to which predicate uses and/or computational uses of variables are included in the test set. The various types of data flow testing strategies in decreasing order of their effectiveness are,

·         All – du Paths (ADUP)

·         All Uses Strategy (AU)

·         All p-uses/some c-uses strategy (APU+C)

·         All c-uses/some p-uses strategy (ACU+P)

·         All Definitions Strategy (AD)

·         All Predicate Uses (APU), All computational Uses (ACU) strategies.


7) Discuss about Slicing and Dicing.

        A (static) program slice is a part of a program (e.g., a selected set of statements) defined with respect to a given variable X (where X is a simple variable or a data vector) and a statement i: it is the set of all statements that  could (potentially, under static analysis) affect the value of X at statement I  where the influence of a faulty statement could result from an improper computational use or predicate use of some other variables at prior statements.

·         If X is incorrect at statement i, it follows that the bug must be in the program slice for X with respect to i

·         A program dice is a part of a slice in which all statements which are known to be correct have been removed.

·         In other words, a dice is obtained from a slice by incorporating information obtained through testing or experiment (e.g., debugging).


8)Explain why static analysis alone is not enough for data flow testing.


There are many things for which current notions of static analysis are inadequate. They are:



  •    Dead Variables
  •    Arrays
  •    Records and Pointers
  •    Dynamic Subroutine and Function Names in a Call
  •    False Anomalies
  •    Recoverable Anomalies and Alternate State Graphs
  •   Concurrency, Interrupts, System Issues

 

                                                       Chapter -7

 

1) Discuss about Domain Closure

  •         A  domain boundary is closed with respect to a domain if the points on the boundary belong to the domain.
  •         If the boundary points belong to some other domain, the boundary is said to be open.

2) Write short notes on Domain Dimensional

  •  Every input variable adds one dimension to the domain.
  • One variable defines domains on a number line.
  • Two variables define planar domains.
  • Three variables define solid domains.
  •  Every new predicate slices through previously defined domains and cuts them in half.
  •  Every boundary slices through the input vector space with a dimensionality which is less than the dimensionality of the space.
  • Thus, planes are cut by lines and points, volumes y planes, lines and points and n-spaces by hyper planes.

3) Discuss Bug Assumption

  • The bug assumption for the domain testing is that processing is okay but the domain definition is wrong.
  •   An incorrectly implemented domain means that boundaries are wrong, which may in turn mean that control flow predicates are wrong.
  •   Many different bugs can result in domain errors.

4) Write short note on Domain Errors

  •   Double Zero Representation
  •   Floating point zero check
  •   Contradictory domains
  •   Ambiguous domains
  •   Over specified Domains
  •   Boundary Errors
  •   Closure Reversal
  •    Faulty Logic

5) Briefly explain about Restrictions to Domain Testing

  • Domain testing has restrictions, as do other testing techniques. Some of them include:
  • Co-incidental Correctness
  •  Representative Outcome
  •  Simple Domain Boundaries and Compound Predicates
  •  Functional Homogeneity of Bugs
  •  Linear Vector Space
  •  Loop Free Software

7) Explain about Nice and Ugly Domains.


Nice Domains:



  •  Nice domain boundaries are complete in that they span number space from plus to minus infinity in all dimensions.
  •  Nice domains are simply connected; that is, they are in one piece rather than pieces all over the place interspersed with other domains.

                              Linear and Non Linear Boundaries

                             Complete Boundaries

                              Systematic Boundaries

                             Orthogonal boundaries

                             Closure Consistency

                              Convex

                              Simply connected

Ugly Domains:




  •          Some domains are born ugly and some are uglified by bad specifications.
  •          Every simplification of ugly domains by programmers can be either good or bad.
  •          Programmers in search of nice solutions will “simplify” essential complexity out of                    existence.           
  •    Testers in search of brilliant insights will be blind to essential complexity and therefore miss important cases.

                                                 Ambiguities and Contradictions

                                                Simplifying the Topology

                                                Rectifying Boundary Closures

Domain testing has restrictions, as do other testing techniques. Some of them include:

·         Co-incidental Correctness

·         Representative Outcome

·         Simple Domain Boundaries and Compound Predicates

·         Functional Homogeneity of Bugs

·         Linear Vector Space

·         Loop Free software

 

                                      Chapter-8

1) What is LOC?

      Count the number of lines of code (LOC) and use as a measure of program complexity.

For example: if  error occur at 2% per line, a 5000 line program should have about 100 errors. If it required 30 tests to find n error, then could inter the expected number of tests needed per line of code.

2) Linguistic metrics

Measuring the properties of program/specification text without interpretation or ordering of the components.

3) Structural metrics

Based on structural relations between objects in program; usually based on properties of control/data flow graph   [ex: numbers of nodes, links, nesting depth]

 

4)Hybrid metrics

            Based on combination (or on a function)  of linguistic and structural properties of a program.

                                         
Chapter – 9

1) Explain about Path Products.

2) Write short notes on Path Expression.

     Consider a pair of nodes in a graph and the set of paths between those node. Any expression that consists of path names and “OR”s and which denotes a set of paths between two nodes is called a “path Expression”.

 

3) Discuss about Absorption Rule.

If X and Y denote the same set of paths, then the union of these set is unchanged: consequently,

RULE 5: X+X+X (Absorption Rule)

                     If a set consists of path names and a member of that set is added to it, the “new” name, which is already in that set of names, contributes nothing and can be ignored.


4) Discuss about Reduction Procedure.

                                                                                  

                                                                         

                                                                
Chapter-10

1) Explain about Garbage-in Garbage-out


                      “Garbage-in equals Garbage-out “ is one of the worst copouts ever invented by the computer industry.

GI-GO does not explain anything expect out failure to:

                 --Install good validation checks

                 --Test the system’s tolerance for bad data.


2) Syntax testing steps


Ø  
Indentify the target language or format.

Ø  Define the syntax of the language, formally,  in a notation such as BNF.

Ø  Test and debug the syntax:

            1. Test the “normal” conditions by covering the BNF syntax graph of the input language.(minimum requirement)

           2. Test the “garbage” conditions by testing the system against invalid data. (high payoff)

Discuss Grammar for formats in detail


 3) Short note on BNF




  •          BNF- Backus-Naur Form
  •          Syntax is defined in BNF as a set of definition. Each definition may in-turn refer to other definition or to itself.
  •          The LHS of a definition is the name given to the collection of object in the RHS

4) Test case generation

There are three possible kinds of incorrect actions:

     1. Recognizer does not recognize a good string.

     2. Recognizer accepts a bad string.

     3.Recognizer crashes during an attempt to recognize a string.

Ø  Even small BNF specifications lead to many good strings and far more bad strings.

Ø  There is neither time nor need to test all string.

 

Chapter-11

 

1) Write short notes on KV charts 

                   The Karnaugh-Veitch chart reduce Boolean algebraic manipulation to graphical trivia. Beyond six variables, these diagrams get cumbersome, and techniques such as the Quine-MaCluskey methods should be used.

Chapter-12

1) What is state?

                A state is an abstract in the life cycle of an object in which it satisfies some condition, perform some action, or waits for some event. It is an abstraction of a set of attribute value grouped together according to the properties that affect the cross behavior of event. For a class, a state is a predicate on the state variable of the class.

 

2) define transaction

            A transaction is an allowable two-state sequence, that is, a change of static caused by an event. For an individual object instance, a transaction is composed of a source state, a target state, and a method applied to that instance. A transaction is composed of three items, an event, a guard, and an action.

3) What is state graph?

State graphs are very useful for describing the behaviors of individual object over a full set of use cases that affect those object. state graph is a combination of state and transitions.

4) Good and Bad state graphs

 Good state graph       
                                                                             

                                 i.      The total number of state in a given state graph is equal to product of the possibilities of factors that make upp the state.

                               ii.      For every state and input there is a unique transition to exactly one state and may be the same state itself

                              iii.      For every transition there is one specific output action

Bad state graph

               i.   No exit node which does not allow to leave the state graph

                            ii.   Incorrect transition

                           iii.   Unspecified or incorrect event

                          iv.   Unspecified or incorrect action

                            v.   Extra, unspecified or corrupt action

                          vi.   Unreadable state

                         vii.   Dad state

                       viii.   Sneak  path

                          ix.   Trap door

5) state testing

                    Define a set of covering input sequence that get back to the initial state when starting from the initial state when starting the initial state.

                     For each step in each input sequence, define the expected next state, the expected transition, and the expected output code.

 

No comments:

Post a Comment

MCQ Question Bank Microsoft PowerPoint