You are on page 1of 5

Basic testing knowledge

1. Having in mind the software development life cycle (SDLC), when are software errors the least
costly to correct?

• During implementation
• During maintenance
• During development
• During requirements analysis

2. Regression testing should be performed:

v) every week
w) after the software has changed
x) as often as possible
y) when the environment has changed
z) when the project manager says

• v & w are true, x – z are false


• w, x & y are true, v & z are false
• w & y are true, v, x & z are false -----corect
• w is true, v, x y and z are false
• all of the above are true

3. Which of the following statements are true?

I. Software testing may be required to meet legal or contractual requirements.


II. Rigorous testing and fixing of found defects could help reduce the risk of problems occurring
in an operational environment.
III. Software testing is mainly needed to improve the quality of the product.
IV. Rigorous testing is sometimes used to prove that all failures have been found.

• I, II and III are true; IV is false;


• I and II are true; III and IV are false;---corect
• II and IV are true; I and III are false;
• III and IV are true; I and II are false;

4. In prioritizing what to test, the most important objective is to:

a)    Find as many faults as possible.


b)    Test high risk areas.--corect
c)    Obtain good test coverage.
d)    Test whatever is easiest to test.

5. Enough testing has been performed when:

a)    Time runs out.


b) The required level of confidence has been achieved.---corect
c)    No more faults are found.
d)    The users won’t find any serious faults.

6. When do you think testing should start? Please elaborate.


7. Please describe the main responsibilities of a tester.

created the plan test


Testing the plan
reported the bugs
create testing reports

SQL

8. Write a SQL statement to display the order number followed by order date and the purchase
amount for each order which will be delivered by the salesman who is holding the ID 5001,
ordered starting with the oldest one first. Table name is 'orders'

ord_no purch_amt ord_date customer_id salesman_id


70001 150.5 2012-10-05 3005 5002
70009 270.65 2012-09-10 3001 5005
70002 65.26 2012-10-05 3002 5001
70004 110.5 2012-08-17 3009 5003
70007 948.5 2012-09-10 3005 5002
70005 2400.6 2012-07-27 3007 5001
70008 5760 2012-09-10 3002 5001
70010 1983.43 2012-10-10 3004 5006
70003 2480.4 2012-10-10 3009 5003
70012 250.45 2012-06-27 3008 5002
70011 75.29 2012-08-17 3003 5007
70013 3045.6 2012-04-25 3002 5001
SELECT ord_no,ord-date,purch-amt
FROM orders
WHERE salesman_id='5001';

9. Write a SQL statement which selects the highest grade for each of the cities of the customers.
Table name is 'customer'

customer_id cust_name city grade salesman_id


3002 Nick Rimando New York 100 5001
3005 Graham Zusi California 200 5002
3001 Brad Guzan London 5005
3004 Fabian Johns Paris 300 5006
3007 Brad Davis New York 200 5001
3009 Geoff Camero Berlin 100 5003
3008 Julian Green London 300 5002
3003 Jozy Altidor Moscow 200 5007
SELECT city,MAX(grade)
FROME customer
GROUP BY city

SELECT city,MAX(grade)
FROM customer
GROUP BY city

10. Write a SQL statement to prepare a list with salesman name, customer name and their cities
for the salesmen and customer who belong to the same city (also, rename the columns to have
suggestive names). Use 'salesman' and 'customer' as tables.

salesman_id name city commission


5001 James Hoog New York 0.15
5002 Nail Knite Paris 0.13
5005 Pit Alex London 0.11
5006 Mc Lyon Paris 0.14
5003 Lauson Hen 0.12
5007 Paul Adam Rome 0.13
11. Update the grade for all the salesman based in New York City to 250. Use the 'customer'
table.

UPDATE customer
SET grade =250
WHERE city =New York

12. Delete all data from rows that have the grade 200 or less. User ‘customer’ table.

Pseudocode

13. Write a pseudo code to replace every third element in the array with the value 10. Assume
that an array filled with 20 different values is already provided.

var = [1.....20]
for(i=1;i<=array.length;i++)
{
if(i%3==0)
{
array[i]=10
}
14. Write the algorithm for recursive Fibonacci.

functionFibonacci(n)
{
if(n<=1)
{
return n;
}
else
{
return fibonaci(n-1)+fibonacci(n-2);
}

Logic

15. Alice, Brie, Carlos and Drake are in a footrace. They have numbers pinned on their shirts: #1
to Alice, #2 to Brie, #3 to Carlos, and #4 to Drake.
When the race ends, none of them place in the same place as their pinned number. Also, Brie
finished ahead of Drake, and Carlos finished ahead of Alice.
Based on this, who placed 3rd?

Drake

API

16. What is an API?

You might also like