Hi bhumika....as per me testing the main functionalities of application is the smoke testing...and sanity testing is a kind of regression test that focuses on one or a few areas of functionality of a particular application/sw and this is usually unscripted. Sanity testing is always performed whenever it is required and if the s/w is deviating from the requirements....please correct me if I am wrong.....
As per my understanding, Smoke test is happened to confirm that whether the built basic functionalities i.e. installation, basic features are fine. On the basis of Smoke testing result Dev team is deciding that whether this built is ready to deliver to QA.
The Sanity test is conducted to confirm that whether the delivered built basic functionalities are ok. On the basis of Sanity test QA team is deciding that whether this built is ready to test.
I agree with Gaurav and following is the more information
I have gathered a few points about the difference between smoke and sanity testing from the responses of two software testing groups. I have added the points below.
However, my experience of executing the Smoke and Sanity testing has been the following:
Smoke Test:
When a build is received, a smoke test is run to ascertain if the build is stable and it can be considered for further testing.
Smoke testing can be done for testing the stability of any interim build.
Smoke testing can be executed for platform qualification tests.
Sanity testing:
Once a new build is obtained with minor revisions, instead of doing a through regression, a sanity is performed so as to ascertainthe build has indeed rectified the issues and no further issue has been introduced by the fixes. Its generally a subset of regression testing and a group of test cases are executed that are related with the changes made to the app.
Generally, when multiple cycles of testing are executed, sanity testing may be done during the later cycles after through regression cycles.
I think Gaurav is right .
Sanity testing is a small kind of regression testing . Normally its done at the time we don't have enough time to perform a complete regression of the AUT .
Sanity Testing is narrow regression test that focus on one or few areas of functioanlity.. it is usually narrow and deep . It is applied for small section of application to check that is working fine after a minor change.
and in Smoke testing we touch every part of the application in cursory way .. to ensure whether most crucial function of program working without bothering about detail. It like shallow and wide approach