Sponsored Ad

Tuesday, May 4, 2010

How to Select Best Version of 2010 for Software Testers

The Visual studio 2010 released version is available now. Every version of VS 2010 have different features. here is matrix specifying all the features for testing. So go though these details and choose best matching version as per your requirement.

VS Test Professional: If you are manual tester and do not need any automation just use Test professional.

VS Premium :  If you are Automation Tester writer and want to use CodedUI tests without Web Test and Load Test

VS Ultimate: If you want to use load testing and web testing, go for Visual studio ultimate version.

VS Ultimate: If you want to do manual and automated testing and want to use all the test features, go for VS Ultimate version.

Test Professional \ Ultimate: if you want to use Lab Manager(Hyper-V \ VmWare)

 

Visual Studio 2010 Versions and Their features:

 

Features

Premium

Ultimate

Test Professional

Code Coverage

X

X

 

Test Impact Analysis

X

X

 

Coded UI Test

X

X

 

Web Performance Testing

 

X

 

Load Testing

 

X

 

Microsoft Test Manager 2010

 

X

X

Lab Management

 

X

X

Tuesday, April 13, 2010

How to Create First Test Project With Vs 2010 Ultimate

1. Go to Test menu -> New Test

How to Create First Test Project With Vs 2010 Ultimate

2. Add New Test Window appears, Select a test type and specify language for test. click OK Button.

How to Create First Test Project With Vs 2010 Ultimate

3. Project Name window appears, specify the project name and click on Create button.

How to Create First Test Project With Vs 2010 Ultimate

4. Congratulations test project is created Now you can write your test cases and run it.

How to Create First Test Project With Vs 2010 Ultimate

Types of Testing Project Available in Visual Studio 2010 Ultimate

Types of Testing Projects Available in Visual Studio 2010 Ultimate

Microsoft Visual Studio 2010 Ultimate Beta 2 is ready for testers also. There is Few basic Test projects are available for testers and developers.

1. Basic Unit Test: Unit test supports C++, C#, VB. By using unit test you can create a unit test project which can call methods, pass parameters and verify return values.

2. Coded UI Test: CodedUITest is very good feature of VS2010. Coded UI Test allows you to record screen actions to perform UI Testing.

3. Database Unit Test: This test is used to test database object, You can test database functions, procedures, triggers etc.

4. Generic Test: A generic test is existing program that has been wrapped to function as a test in VS.

5. Load Test: Load test will help you to test application with virtual multiuser platforms.

6. Ordered Test: Use to test particular cases in certain order.

7. Unit Test: I is advance version of Basic unit test and perform same kind of functions.

8. Unit Test Wizard: Its same as Unit test while you can generate the unit test from your source code and customize them as per requirement.

9. Web Performance Test: You can test website performance by using performance test inside the load test.

How to Debug/Unit Test JavaScript Functions in VS2005

Debugging with JavaScript is easy now in VS2005. Let’s start with a simple example.

Prerequisite for JavaScript Debugging:

Go to tools -> Internet Options -> Advance tab

Please note that these settings for IE 7 and can vary for other versions of IE.

How to Debug/Unit Test JavaScript Functions in VS2005

Uncheck the Disable Script Debugging (Internet Explorer)

And Uncheck the Disable Script Debugging (Other)

How to Debug/Unit Test JavaScript Functions in VS2005

And for Microsoft VM

Uncheck Java console enabled

Uncheck logging enabled

Check JIT compiler for virtual machine enabled

 

Lets create a JavaScript function and start debugging/Unit testing

So we have a JavaScript function:

<html>

<head>

<script language="javascript" type="text/javascript">

function jFunction()

{

debugger;

var str1 = "How to do Unit Testing ";

var str2 = "How to use Debugger in JavaScript ";

alert(str1);

}

</script>

</head>

<body>

<form id="Form1" runat="server">

<asp:button runat="server" text="Button" OnClientClick="jFunction()" />

</form>

</body>

</html>

debugger is kind of breakpoint in JavaScript and when this function will execute our execution pointer will stop here. Alert() is used to display message in alert box.

Just run your web application by pressing the F5 button from keyboard.

Click on the Button.

How to Debug/Unit Test JavaScript Functions in VS2005

A debugging window is opened and execution stops at debugger;

How to Debug/Unit Test JavaScript Functions in VS2005

These are debugging buttons used to debug the code.

clip_image010 Break to next statement

clip_image012 Step Into: It is used to send the execution, inside the function code.

clip_image014 Step Over: it execute the current statement and send execution pointer to next statement.

clip_image016 Step out: it send execution pointer to out of function and execute all function code.

So as the execution goes on , at any point of time you can check the intermediary values of variables by mouse over the variable or right click the variable - > Quick watch

Monday, April 12, 2010

How to Attaché Debugger While Running .NET Web Application

Sometimes while running .NET web application, need to debug project and there is a need to attaché a debugger to running web application.

http://localhost:1764/SampleWebsite/Default.aspx

How to Attaché Debugger While Running .NET Web Application

suppose you are  running a site as in above figure. now you want to attaché debugger to it.

go to Debug –> attaché to process

How to Attaché Debugger While Running .NET Web Application 

Now Search for port number 1764(Same  port where your web application is running as given in first figure) and click on attaché.

How to Attaché Debugger While Running .NET Web Application

congratulations you have successfully attached the debugger now you can add breakpoint and debug the application.

How to Debug/Unit Test C# Application With Visual Studio

 

Debugging is very important part of unit testing. You need to go through every step of code and find that logic is working fine or not. This post will help you to debug/unit test your visual studio application.

Step by Step guide to Debug .NET application:

Step 1: The first step is set a breakpoint in your code by Right click –> breakPoint –> Insert BreakPoint or click on left vertical bar.

How to Debug/Unit Test C# Application With Visual Studio

How to Debug/Unit Test C# Application With Visual Studio

To Remove breakpoint you can Right Click on line –> BreakPoint – > Delete BreakPoint, If you want to Disable breakpoint for sometimes then Right Click on line –> BreakPoint – > Disable BreakPoint

 

Step 2: now Run the program in Debugging mode by pressing F5 or click a Green Button with Debug option.

How to Debug/Unit Test C# Application With Visual Studio

now when you run the program the execution pointer will stop to debug point if application will try to run the same line code.

How to Debug/Unit Test C# Application With Visual Studio

step 3: you can use debug option to debug line by line execution and can know the intermediate values and effect of execution of each line.

to check intermediate values just mouse over the variable name or right click to variable and select quick watch.

How to Debug/Unit Test C# Application With Visual Studio

Debug Options:

How to Debug/Unit Test C# Application With Visual Studio

Stop Debugging: shift + F5

Restart Debugging : Ctrl+shift+F5

Step Into: F11

Step Over: F10

Step Out: shift+F11

Delete All breakpoints Ctrl+Shift+F9

These operation you can do either using keyboard keys or menu.

 

Let me explain you some very important functions:

Step Into: F11: It send the next execution inside the code block, suppose there is a function then it will send execution inside function.

Step Over: F10: Normal execution , execute next statement.

Step Out: shift+F11: Execute all code and bring out the function or any inside code block.

Sponsored Ad

Related Software Testing Articles

Development Updates

Tech Updates