Quality Testing

Quality is delighting customers

Hi,

Can anybody tell me answers for the following questions,

1) What is Difference Between Stubs and Drivers?
2) What is Difference Between Website and Web Application?
3) Exact Difference between Smoke and Sanity Testing?

regards
Tirru

Views: 215

Reply to This

Replies to This Discussion

1) Most often stubs and drivers are used to replace the missing software and simulate the interface between the software components in a simple manner. A Stub is called from the software component to be tested,and a Driver calls a component to be tested.
thank u karthi
What is Difference Between Stubs and Drivers?

It is always a good idea to develop and test software in "pieces". But, it may seem impossible because it is hard to imagine how you can test one "piece" if the other "pieces" that it uses have not yet been developed (and vice versa). To solve this kindof diffcult problems we use stubs and drivers.

In white-box testing, we must run the code with predetermined input and check to make sure that the code produces predetermined outputs. Often testers write stubs and drivers for white-box testing.

Driver for Testing:

Driver is a the piece of code that passes test cases to another piece of code. Test Harness or a test driver is supporting code and data used to provide an environment for testing part of a system in isolation. It can be called as as a software module which is used to invoke a module under test and provide test inputs, control and, monitor execution, and report test results or most simplistically a line of code that calls a method and passes that method a value.

For example, if you wanted to move a fighter on the game, the driver code would be
moveFighter(Fighter, LocationX, LocationY);

This driver code would likely be called from the main method. A white-box test case would execute this driver line of code and check "fighter.getPosition()" to make sure the player is now on the expected cell on the board.

Stubs for Testing:

A Stub is a dummy procedure, module or unit that stands in for an unfinished portion of a system.

Four basic types of Stubs for Top-Down Testing are:

1 Display a trace message
2 Display parameter value(s)
3 Return a value from a table
4 Return table value selected by parameter

A stub is a computer program which is used as a substitute for the body of a software module that is or will be defined elsewhere or a dummy component or object used to simulate the behavior of a real component until that component has been developed.

Ultimately, the dummy method would be completed with the proper program logic. However, developing the stub allows the programmer to call a method in the code being developed, even if the method does not yet have the desired behavior.

Stubs and drivers are often viewed as throwaway code. However, they do not have to be thrown away: Stubs can be "filled in" to form the actual method. Drivers can become automated test cases.

What is Difference Between Website and Web Application?

Introduction:

If you are not very familiar with Visual Studio 2005, a "web site" and "web application project" may sound the same for you.

Microsoft introduced the concept of "website" instead of "web application" in Visual Studio 2005. However, due to demand from the development community, they re introduced the "web Application Project" which is pretty much similar to Visual Studio 2003 web application.

Web site in Visual Studio 2005

A web site is just a group of all files in a folder and sub folders. There is no project file. All files under the specific folder - including your word documents, text files, images etc are part of the web site.
You have to deploy all files including source files (unless you pre compile them) to the server. Files are compiled dynamically during run time.

To create a "web site", you need to use the menu File > New > Website
You will have the option to choose either one of the following location types:

File System - Allows you to choose a folder to put all the files.
Http - Allows you to choose a virtual directory to put the files.
FTP - Allows you to choose an ftp location.

In any of the above cases, no project file is created automatically. Visual Studio considers all files under the folder are part of the web site.

There will be no single assembly created and you will nto see a "Bin" folder.
The benefits of this model is, you do not need a project file or virtual directory to open a project. It is very handy when you share or download code from the internet. You just need to copy the downloaded code into a folder and you are ready to go!

How to open a web site, if there is no project file?

It looks bit confusing until you get familiar with the Visual Studio 2005 programming model.
To open a web site (which do not have a project file), you need to first open Visual Studio 2005 and choose the menu File > Open > Website. It allows you to select a folder (not a project file). Thats all you have to do to view all the files part of the web site.

Disadvantages of web site model

Since there is no project file, there is nothing that you can double click to open the web site in Visual Studio for editing. You have to open Visual Studio first and then open the site from VS2005.
Another disadvantage is, all files under the folder and considered to be part of the web site. There are lot of legacy web sites where more than one web site is combined into one folder, but properly managed the files by including them in appropriate projects. With the new model, since there is no project file, all files are considered to be part of the same website.

How to exclude a file from a web site in VS2005?

Many programmers keep lot of document files and backup files under the project folder. With the new model, they are all part of the web site. If you have backup files which has same class names, you may get compilation problems when they are compiled dynamically sicne they will be treated as duplicate classes. The only way you can exclude a file from the website within the same directory is by renaming them with the extension .exclude

Web Application Project in Visual Studio 2005

Microsoft introduced the "web site" concept where all files under a web site are part of the site, hoping that the development community is going to love that. In fact, this is very usefull to share code.
However, they did not consider millions of existing web applications where people are comfortable with the "project" based application. Also, there were lot of web applications where several un wanted files were kept under the web site folder. So, the new model did not work well for them.

When people started screaming, Microsoft came up with the answer. On April 7, 2006, they announced "Visual Studio 2005 Web Application Projects" as an Add-On to Visual Studio 2005. This Add-On will allow you to create and use web applications just like the way it used to be in Visual Studio 2003.

The Visual Studio 2005 Web Application Project model uses the same project, build and compilation method as the Visual Studio .NET 2003 web project model.
All code files within the project are compiled into a single assembly that is built and copied in the Bin directory.
All files contained within the project are defined within a project file (as well as the assembly references and other project meta-data settings). Files under the web's file-system root that are not defined in the project file are not considered part of the web project.

Which is best for me - Web site or web application project?

Both has it's own advantages and disadvantages.
A web site is good for you if you just want to create web sites and share with others. It is ideal for new projects.
However, "web application project" is better if you are planning to migrate your Visual Studio 2003 or 2002 web sites into Visual Studio 2005. Otherwise you may end up spending lot of time to exclude unwanted files from your web site folder.

Exact Difference between Smoke and Sanity Testing?

Smoke Testing:

Smoke testing originated in the hardware testing practice of turning on a new piece of hardware for the first time and considering it a success if it does not catch fire and smoke. In software industry, smoke testing is a shallow and wide approach whereby all areas of the application without getting into too deep, is tested.

A smoke test is scripted--either using a written set of tests or an automated test

A Smoke test is designed to touch every part of the application in a cursory way. It's is shallow and wide.

Smoke testing will be conducted to ensure whether the most crucial functions of a program work, but not bothering with finer details. (Such as build verification).

Smoke testing is normal health check up to a build of an application before taking it to testing in depth.

Sanity Testing:

A sanity test is a narrow regression test that focuses on one or a few areas of functionality. Sanity testing is usually narrow and deep.

A sanity test is usually unscripted.

A Sanity test is used to determine a small section of the application is still working after a minor change.

Sanity testing is a cursory testing; it is performed whenever a cursory testing is sufficient to prove the application is functioning according to specifications. This level of testing is a subset of regression testing.

Sanity testing is to verify whether requirements are met or not, checking all features breadth-first.
thank u kiran very much
Nice explanation Kiran.
Kiran, Very good explanation
Hi Kiran,

I agree with your answer.

Thanks,
Sailaja
Hi Tirru,

stubs are dummy modules which are known as "called programs" which is used in integration testing (top down approach),used when sub programs are under construction.

Drivers are also kind of dummy modules which are known as "calling programs",which is used in bottom up integration testing, used when main programs are under construction



Website:

A web site is just a group of all files in a folder and sub folders. There is no project file. All files under the specific folder - including your word documents,text files, images etc are part of the web site.


Microsoft introduced the "web site" concept where all files under a web site are part of the site, hoping that the development community is going to love that. In fact, this is very usefull to share code.

However, they did not consider millions of existing web applications where people are comfortable with the "project" based application. Also, there were lot of web applications where several un wanted files were kept under the web site folder. So, the new model did not work well for them.


Smoke Testing and Sanity testing

sanity testing is an Initial effort to check whether the application can be tested further without any interruption. Basic gui functionality connectivity to database are concentrated here.

Smoke Testing: It covers most crucial functions of the application..testing carried out check whether most crucial functions of the application work fine or not? dont bother about the in-depth coverage of each testset.what are most crucial functions in the build you should know it before coming to testing phase. or your manager will write a seperate high-level testcase for that.

Regards
Gowtham
let me know gowtham and kiran answers for sanity and smoke definitions is same, i think they said differently
@ Kiran, very good reply especially Website and Web application.

Thanks,
Siddiq
@ Tirru,

Where did you find in the explanation "let me know gowtham and kiran answers for sanity and smoke definitions is same, i think they said differently"

Let us know, will try to resolve your misconceptions.

Thanks,
Siddiq
that is, am asking they said same definitions or different one for sanity and smoke. Please read it. i want clear explanation for sanity and smoke,

because some body's are saying Smoke testing is to check whether we go for main testing functionality or not,
some other guys are said sanity testing is checking whether this build is ready to test Major testing.

This is my doubt yaeh, which one is correct

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service