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.

Sunday, April 11, 2010

How to Set Goals in Yearly Evaluation

Please find some tips to describe your goals - 

1) Goals are generally of short-term in nature. Goals can we viewed as steps to achieve a desired objective.

2) Goal should be quantitative /measurable.  You should be able to further break down a goal into activities which are nothing but work-items. So when

we come back and review this goal after, say, 6 months, we should be able to have some document, report or some proof that we undertook for these activities.

3) It is always good to add a line to represent “how” you will achieve a particular goal. For example, “To achieve senior designation in organization”

can be appended with “by participating in multiple projects, providing mentoring and updating my skill set /expand my responsibilities fitting the higher designation”.

4) All goals should be time-bound. For example, “I will complete ABC certification by March2008”. You may append a goal statement with a date, month/year, or recurring-duration (weekly, monthly…).

5) Avoid using generic terms like ‘All’, ‘some’, ‘etc’, ‘regular’, ‘periodic’, ‘should’, ‘may’ and so on in your goal statements.

6) Do not mention items as goals which are already a part of your responsibilities.

7) Try to make a clear distinction among your career-objective, existing responsibilities and the goals you are mentioning.

Hope this helps. Thanks for reading,

Wednesday, April 7, 2010

Unit Testing With Complex Dynamic Query in PL/SQL - Oracle

image

Dynamic queries are complex sometimes and it is very hard to debug them. Here is a simple approach to get the dynamic queries and debug them.

I am taking a very simple dynamic query while you can test it with complex one.

Its Global table approach to get dynamic query as static query and then debug the query in SQL window.

So lets start with a dynamic query.

DECLARE
vsql varchar(4000) := '';
vResult varchar2(1000) := '';
v_name varchar(100) := 'My_Name';

BEGIN

vsql:='insert into temp_table(id, name)  values(1, '''|| v_name ||''' )';
  delete from test_sql;
  insert into test_sql values(vsql);      
  commit;
EXECUTE IMMEDIATE VSQL ;
END;

The above Given dynamic query Program will execute and insert the constructed query into test_sql table.

To get this Static query you just have to first run the your procedure/function and then execute

select * from test_sql

you will get static query in results

When this dynamic query is is converted in static one at runtime it looks like:

insert into temp_table(id, name)  values(1, 'My_Name' );

You just copy and paste the given query into your SQL window and you can debug if there is any syntax error or logical error and you can change the corresponding things in your dynamic query.

Monday, April 5, 2010

SQL Basics for Software Testers | Unit Testing with SQL

SQL stands for Structured query language. There is 4 basic query statements we use to do common functions. These basic statement will help you to construct data for unit testing in database.

1. Select

2. Insert

3. Update

4. Delete

 

The SELECT statement is used to select data from a database.

SELECT * FROM your_table_name;

the above query is used to select the values from table - your_table_name

 

The INSERT INTO statement is used to insert new records in a table.

INSERT INTO table_name (column-1, column-2, column-3,...)
VALUES (value-1, value-2, value-3,...);

The above statement is used to insert value-1, value2 etc to insert in column-1 , column-2 etc in table_name  table.

 

The UPDATE statement is used to update records in a table.

UPDATE your_table_name
SET column-1=value-1, column-2=value-2,...
WHERE column-3=given_value

The above statement is used to update column-1 and column-2 values to value-1 and value-2 for only those rows which have column-2 values equal to given_value

 

The DELETE statement is used to delete records in a table.

DELETE FROM your_table_name
WHERE column-3=given_value

The above statement will delete all those rows from your_table_name which have column-3 values equal to given_value.

Sponsored Ad

Related Software Testing Articles

Development Updates

Tech Updates