Professional Documents
Culture Documents
Contoh_Test_Casesimna
Contoh_Test_Casesimna
com
Try It / Solve It
1. Design and carry out tests to check the following:
Solution:
Test Num-
Expected Result/
Test De-
scription
Input Action
Output Discrepancy
Date
ber
1 a INSERT INTO employees (em- cannot in- cannot insert NULL None
ployee_id, first_name, sert NULL into JOB_ID
last_name, email, phone_num- into
ber, hire_date, job_id, salary, JOB_ID
commission_pct, manager_id,
department_id)
VALUES (300, 'Fred', 'Smith',
'a@b.com', 123456, '01-Jan-
2006',
NULL,2000,NULL,100,90) ;
2 b INSERT INTO job_history (em- Check Check constraint vi- None
ployee_id, start_date, constraint olated
end_date, job_id, depart- violated
ment_id)
VALUES (400, '01-Jan-2006',
'01 DEC 2005','IT_PROG',60) ;
3 c DELETE departments 1 row de- integrity constraint Alter refer-
WHERE department_id =10 ; leted violated - child rec- ential integ-
ord found rity con-
straint
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2
2. If one of the above tests fails, write out the SQL statement(s) that would be needed to
correct the test. With the permission of your teacher, implement the change and then
rerun the test with the same input and confirm that it works.
Solution:
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.