Test oracle determine that whether a test executed as expected or not. Essentially you can say test oracle is a mechanism to determine whether program, software or application got executed as expected for a particular Test Case or not? A test oracle may be either manual or automated.
Let us understand test oracle with an example. You are automating test of File Download Functionality. Downloading of file may take following steps
- User will click on a Button
- On click of button Operating System File Download dialog will open
- User will select download location
- File download will start
In above test case to verify successful download of file you may want to create a test oracle which will verify size of downloaded file on the file system. Hence in this case,
Test Oracle is very specific to a business scenario and probably tool may not able to automate this. Test Oracle can be written as Coded Step.
We can summarize Test Oracle as parameter which verify that whether application passed a test for a particular test case or not.