Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

1. Explain the difference between computation error and domain error. Give an example Java code showing a domain error. What is domain error–based testing? 2. Given the following sample code written...

1 answer below »
1. Explain the difference between computation error and domain error. Give an example Java code showing a domain error. What is domain error–based testing? 2. Given the following sample code written in Java programming language: XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXdouble getGrossPay(double rate, double hrwkd) { final double OTR = 1.5; double reghr = 0.0, regpay = 0.0; double othr = 0.0, otpay = 0.0; double holhr = 0.0, holpay = 0.0; double grosspay = 0.0; if (hrwkd <= 0) grosspay = 0.0; else { int whole = (int) hrwkd; double frac = hrwkd - whole; frac = 100*(Math.ceil(frac*4)/4); hrwkd = whole + frac/100; reghr = 0.0; othr = 0.0; reghr = 0.0; if (hrwkd > 40){ reghr = 40; othr = hrwkd - 40; } else { reghr = hrwkd; othr = 0; } otpay = othr * OTR * rate; regpay = reghr * rate; grosspay = regPay + otpay; } return grosspay; } a. Draw the data flow diagram for the above sample code. Find all the anomalies along with their type in the above code. b. Find an infeasible path (if exists) in the data flow graph for the getGrossPay method. c. Give all the Def() and c-use() Sets of Nodes in the above data flow graph in tabular form. d. Give Predicates and p-use() Set of Edges in the above data flow graph in tabular form. e. By referring to the data flow graph obtained above, find a set of complete paths satisfying the all-defs selection criterion with respect to variable hoursWorked. 3. Consider the three domains D1, D2, and D3 shown below: Domain D3 consists of all those points lying on the indicated straight line. What is the equation that that straight line? Assuming that maximum X and Y span of all the three domains are [−4, 4] and [4, -4], respectively, give the predicates and then give five sets of concrete values of test points for each of the domain D1, D2, and D3. Find ON-points and OFF-points for each domain. 4. Using the module hierarchy given below, show the orders of module integration for the topdown and bottom-up integration approaches. Estimate the number of stubs and drivers needed for each approach. Specify the integration testing activities that can be done in parallel, assuming you have three SIT engineers. Based on the resource needs and the ability to carry out concurrent SIT activities, which approach would you select for this system and why? 5. Suppose that you plan to purchase COTS components and integrate them with your communication software project. What kind of acceptance criteria will you develop to conduct acceptance testing of the COTS components? Test Automation: Selenium Webdriver 6. Write and execute automation code using Java and Selenium Webdriver that will launch Google home page automatically and will check and verify all the footer links of that page without any manual interaction. Note that there are a total of 5 (five) footer links; on the left side of the footer: Advertising, Business; on the right side of the footer: Privacy, Terms, Settings. When Settings link is clicked it displays a popup menu. Test any three of the menu options. Test of a footer link is successful if it loads the browser page for that link. You will verify whether a page was loaded or not by matching its window title. If the expected window title and the actual window title are same then the test passed. Note that the page title of the privacy page (loaded by clicking "Privacy" link of the footer) is: "Privacy Policy - Privacy & Terms - Google". You will submit the Java file (named: footertest.java) and the console output in a text file (named footerlog.txt).
Answered Same Day Apr 25, 2022

Solution

Anandkumar answered on Apr 25 2022
98 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here