265 question

Ace your homework & exams now with Quizwiz!

What is automated testing?

In software testing, test automation is the use of special software (separate from the software being tested) to control the execution of tests and the comparison of actual outcomes with predicted outcomes.

What are different types of verifications? (Walkthrough/Code Inspections)

Static Code Analysis Static verification is the set of processes that analyzes code to ensure defined coding practices are being followed, without executing the application itself. Walkthrough: walk through the code by your self . Code Inspections: seating with someone else . Inspection Checklist 1.function size, complexity 2.poor encapsulation 3.poor logic 4.switch statement without default case 5. redundant variable

* errors of commission and omission, why black box testing cannot find commission

White-Box Testing does not typically find faults relating to missing functionality (Errors of Omission) • Black-Box Testing does not typically find faults relating to extra functionality (Errors of Commission) BBT only based is specification driven tests, won't find the extra functionality problems.

Understanding your TestNG Annotations

@Test:Marks a class or a method as part of the test. @BeforeClass:The annotated method will be run before the first test method in the current class is invoked. @DataProvider(name = 'xx') : Marks a method as supplying data for a test method. @Test(dataProvider = "test1") use the data from dataProver test as input of this test method. assertEquals(actual, expected) if the value is the equals based on the defult equals method. assertSame(actual, expected) if the same object. By writing a separate equals() method we can compare objects in a very specific way.

* intergration tesing: stub driver Top-down integration testing Bottom-up integration testing

Driver are the modules call the software undre test with input Stub are the modules the software under test calls Top-Down Integration Testing: from test driver, add level1 below it and add lever 2 .... Bottom-Up Integration Testing: from the stub level, add level n to it and then add level n-1 to it , until add level 1 Incremental Feature Integration Testing - Add features - "Sideways integration"

BBT: Boundary Value Analysis (BVA)

Strengths • Focus on areas where faults are likely to be found • Data Values are provided by the technique Weaknesses • Combinations of inputs not tested

Philosophy and Theory of Software Testing; what does test actually do

Testing is the process of executing a program with the intent of finding errors, faults and failures. Software tests are considered successful if they find errors, faults and failures that can be fixed.

What is the difference between verification and validation?

Verification is checking if the software works Correctly.check against Specification. It is often an internal process. Validation:Meet the Customers Needs. It often involves acceptance and suitability with external customers. Contrast with verification.Meets User's Needs

When is a decision table used?(truth table)

decision table ( 'cause-effect' table, truth table) is a good way to deal with combinations of things.

What is the Competent programmer hypothesis?1

'competent programmer hypothesis'. According to this hypothesis, programmers write programs that are almost perfect. The competent programmer hypothesis says that program faults are syntactically small and can be corrected with a few keystrokes.

what is Black Box Testing, white box testing , what's the difference. Which test cases are written first: white boxes or black boxes?

Black-Box Testing(Specification-Based or Functional Testing): uses the program specification to derive tests. It aims to verify that the program meets the specified requirements, without any knowledge the program internals. Characterised by how a subset of all the possible input sets is selected. White-Box Testing( (Implementation-Based or Structural Testing) : uses the software implementation to derive tests.It aims to exercise some aspect of the program and expose errors in the program structure or logic. White-Box Testing techniques are characterised by their Coverage Criteria Blackbox testing comes first. Black-box testing to verify the features. White-box testing as necessary if things are broken. If all the black-box tests pass and the coverage is good, white-box testing is unnecessary.

WBT: Control Flow Graphs (CFG)

Control Flow Graphs (CFG) used to represent the flow of control. Node represents one or more indivisible statements. The goal is to ensure that every line of (source) code has been executed step 1: mark node (if,else,for,while,return) step 2: draw graph step 3: write out paths step 4: input and output for each paths step 5: write TestNG test cases if(A||B) need 2 testcases to cover. Strengths • Provides a minimum level of coverage by executing all statements at least once. • There is a significant risk in releasing software before every statement has been executed at least once during testing • Statement Coverage can generally be achieved using only a small number of tests Weaknesses • Can be difficult to determine the inputs • May be hard to test code that can only be executed in unusual circumstances • Does not provide coverage for "NULL else" conditions. For example, in the code: - if (number < 3) number++; • Statement Coverage does not force a test case when number≥3 ● Logical conditions in the software code (depending on how they are written) cannot be tested by this approach. ● Take the following two examples of IF without ELSE statements: If (number < 3) Number = number + 10 If ((a > 3) || (b < 0)) X = a + b + X DOES NOT FORCE A TEST FOR NUMBER >= 3 as there is no ELSE statement DOES NOT FORCE A TEST (a < 3 and b >= 0)

* distinction between error, fault ,failure

ERRORS - made by software developers - they lead to faults in the software FAULTS - problems or incorrect code in the source code. Faults lead to failures in program execution FAILURES - these are the symptoms of a fault. When the software fails to behave in a certain way. Faults can remain hidden until a certain set of conditions appear.

How does a coverage tool work?

EclEmma is a free Java code coverage tool for Eclipse, It brings code coverage analysis directly into the Eclipse. After launch EclEmma of with a target Test, it tells if the each statement of the SUT(software under test) is covered by the Test. For example, if all the statements of the method are covered by the target test. then the coverage of that method is 100%. green for fully covered lines, yellow for partly covered lines. red for lines that have not been executed at all.

About the Eclipse IDE - TestNG, ECLemma, Static Code Analysis, Selenium; what is eclipse IDE(not a thing to write java in) what test testng, what is eclemma,

Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. It can intergrated testng, eclemma, selenium.. framework Eclipse can do part of the Static Code Analysis :you put i=0; but you never use it, eclipse will find out ,and warn u variable is unused. read code without execture.

* exhaustive testing is not realistic, and why heuristic techniques are used to produce a subset of the tests.

Exhaustive Testing is Infeasible, we cannot test all the combination of the input of the software. Because the hardware and software limitations.We need to use heuristics to select a subset,significantly reduce the size of the test data,provide almost as good "test coverage". Two Main Approaches: Black Box Testing and White Box Testing.

* Succinctly explain the technique of 'Fault-insertion' or 'Mutation testing'.

Mutation Testing is a method of inserting faults into programs to test whether the tests pick them up, thereby validating or invalidating the tests. Goals • To assess the quality of the tests by performing them on mutated code • To use these assessments to help construct more adequate tests • To thereby produce a suite of valid tests which can be used on real programs

What is portability testing?

Portability testing is a process of testing with ease with which the software or product can be moved from one environment to another. A piece of software, if it can run on windows 7 or wondows10

What is Monkey testing?

Random data is given as input to tests. This data is often generated automatically by other software.called Monkey testing. Random testing has a number of advantages ● It is cheap to use: it does not need to be smart about the program under test. ● It does not have any bias: unlike manual testing ● It is quick to find bug candidates: it typically takes a couple of minutes to perform a testing session. ● If software is properly specified: it finds real bugs. ● It is not costly Random testing has a number of disadvantages ● It only finds basic bugs (for example Null pointer exceptions). ● It is only as precise as the specification and specifications are typically imprecise. ● It compares poorly with other techniques to find bugs (such as code coverage). ● Reproducing the bugs (if they occur) becomes a challenge because you have to regenerate random data. Therefore it's very important to make logs of your test inputs.

* importance of software testing.

Software Quality is Important, a software failure may cause the company million dollars.

* stress tesing, load testing,regressiontesting

Stress Testing: Test the performance of the system at high levels of loading. This can take many forms - very high levels of concurrent usage, very large inputs, worse case scenarios in algorithms, etc. Focus is system behavior at or near overload conditions Performance Testing Essentially testing the performance of the system - testing the run time(s) of the system, the response of the complete system. Load Testing is the process of putting demand on a software system or computing device and measuring its response. • Determine combinations of concurrent users, transactions per unit , and data load processed by server per that cause performance to degrade

BBT: Combinations of Inputs (CI) - Truth Tables - Cause-Effect Graphing - Decision Tables

Truth Table : • "Don't Care" Conditions used to reduce the number of rules. • The rules must be mutually exclusive

Explain Unit Testing, Integration Tests, System Testing and Acceptance Testing?What's the difference between System testing and Acceptance testing?

Unit Testing: It Tests a "unit" of software (e.g. Method, class).Can only be done by calling the "unit" from a test program.give it the necessary input.always automated using a test harness. INTEGRATION TESTING: the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing. Test multiple classes,The sub-systems can be, Libraries,Applications, Program with no U/I; System testing: It's testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black-box testing, and as such, should require no knowledge of the inner design of the code or logic. Can only be done in 3 ways:Manually, Record-and-playback, or using a test harness. Acceptance Testing: Check for problems in real-world use.Typically run by customer for contract software before payment. Internal: Alpha Testing External volunteers: Beta Testing Regression Testing: It trigered after a change to the software under test, a new feature or a bug fix.Make sure existing features still work

Models of Software Testing - V Model, AGILE, Waterfall . testing aspect of it.

V-model : Typical V-model shows Software Development activities on the Left hand side of model and the Right hand side of the model actual Testing Phases can be performed. every single phase in the development cycle there is a directly associated testing phase dvantages of the V-Model Approach ● It has evolved over time and supports flexibility and agility throughout the development process ● It is a highly disciplined approach, it promotes meticulous design, development, and documentation necessary to build stable software products ● Most of the defects and bugs are found in the beginning of the project development. So less chances of defects or bugs occuring at final testing phase. Waterfall mode: test invloved in the end of the development process. Agile development - Specification, design, implementation and testing are inter-leaved and the outputs from the development process are decided through a process of negotiation during the software development process.

BBT:Equivalence Partitioning (EP) Array

empty array single element array with positive value single leelment array with neg value two element array sorted array semi-sorted array reverse sorted array random array array with all the same values array with all the zero values array with all the large values(positive) array with all the small values(negative)

● Can you understand the difference between Selenium and TestNG? Can you understand how they work together? ● Could you read Selenium code? ● What are the challenges of System Testing with Selenium vrs the Unit Testing that we perform with TestNG?

selenium: Automating tests of Web-based forms and Web-based Components. TestNG: is a testing framework , it runs the methods as tests and manage to display the tests result. They can work seperately, selenium fire the browser and usuability test. dont need junit or testng. System testing different with bbt, whitebt,Testing the software system as a whole. Why selenium: Taking the other automation tools into consideration, Selenium has the capability to operate on almost every OS. • Selenium is an open source testing tool and hence it serves for cost-effective automation testing. • Selenium supports multiple languages such as Python, Pearl, Ruby, PHP, .NET (C#) and Java. You are required to be comfortable in just a single • language in order to operate Selenium. This testing tool supports a range of browsers like Opera, Safari, Chrome, IE 6, 7, 8 and Mozilla Firefox. • Selenium has a very dynamic developer community that is backed by Google. • So far as Selenium is concerned, we have a number of robust methods for location of elements such as CSS, Xpath, DOM, and so on. • Selenium provides support for integration of open source frameworks like TestNG, JUnit, NUnit and so on. • With the use of Selenium, it is possible to execute simultaneous tests leveraging various browsers on various machines. This is turn cuts down the time for test execution when a large project is in progress.

Does an increase in testing always improve the project?

tester get the errors not the tester job to go fix it.

BBT:Equivalence Partitioning (EP)

• Each error case must have its own unique test - because of error hiding • Generate as few tests as possible: each new test should select data from as many uncovered partitions as possible. • Error cases treated separately • Goal: 100% coverage of the EPs EP Strength: • A minimum level of black-box testing • At least one value has been tested from every input and output partition • Likely to ensure basic correctness • Good for "data processing" applications: easy partitioning • Structured approach for Test Cases. EP Weaknesses: • Does not exercise decisions in the code. - decisions are a source of mistakes - decisions generally reflect the boundaries of input partitions, or combinations of inputs • Boundaries & Combinations not tested • The technique does not provide an algorithm for finding the partitions or selecting the test data. Testing different types of data - integers, Strings, arrays, Objects

*What is a Software Test

• Setup the SUT (Software Under Test) • Invoke the SUT with the test inputs • Collect the test outputs • Compare them with the expected outputs • Determine the result:Pass, or Fail or Other (test failed to execute) • Record the result


Related study sets

AS 357 Exam 3: Questions ON the test

View Set

Unicellular Parasites - Amoebas and Apicomplexans

View Set

Operations Review Notes (chapters 6-9)

View Set

Map of the Modern World Composite Study Guide

View Set

Chapter 7 motivating yourself and others, Chapter 5: Motivating yourself and Others, Chapter 9 achieving emotional balance

View Set

Public Speaking Supporting Materials Quiz

View Set