Sponsored Ad

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.

Tuesday, March 30, 2010

Oracle Procedure Unit Testing Using PL/SQL Developer

This post will help developers and unit testers to test oracle procedure using PL/SQL Developer.

Lets start step by step procedure to unit test a procedure.

I am assuming that you already have a PL/SQL developer and a procedure created in it.

I have a Procedure called PKG_Test and it have two input parameters and a output cursor.

Step 1: just open a browser window in PL/SQL Developer by Checking Tools-> Browser option.

browser window in PL/SQL Developer

 

Step 2: Search for procedure and right Click on it and click the View Spec and Body option.

View Spec and Body option PL/SQL

 

Step 3:  Now Package is open in new window just right click on procedure name and click on test option in menu.

Package window PL/SQL

 

Step 4: Test window opened now to start unit testing (Debugging) just enter the input parameter if any and click on Start Debugger button or F9.

Start Debugger button

 

test window PL/SQL

 

Step 5: Now cursor goes inside the procedure block . there is options to stop testing execute all blocks and step over and step out.

Let me explain all things clearly.

 

image Run button(CTRL R) will run the program till next break point, if no break point is there, it will just execute all code.

image Step into (CTRL N) will go inside the functions or another procedure, if any.

image Step Over(CTRL O) will move the debugger control to next executable statement.

image Step Out (CTRL T) will move the debugger control to the parant function or procedure.

image Run to Next Exception will run the control to next exception otherwise break the debugging.

PL/SQL Debug window

you can test the variable values at any point of debugging time, just go to Script tab and insert in the variable name under variable column and you will get current value of the variable under value column.

This program is just to demonstrate the debugging process in PL/SQL developer, we haven't used any passed parameter in this. you can use as per your requirement.

PL/SQL check variable values

 

Step 6:  Now procedure run is over and you can check the results at Cursor … icon.

Once the debugging is complete you can check the results of procedure in test window cursor column.

 

PL/SQL Results

Step 7: A new result window opened and you can see the results in window.

This procedure of block is returning 3 rows which contains the 'c' character in name column.

result window PL/SQL

Now you can debug the complex procedures. Happy testing.

Online Feed Validation | How to check Validity of RSS / Atom Feed

Feed validation service is available online directly on W3C official website.  There are two options available for QA. Either by direct input of feed data or just type the URL of feed and just click on Check.

Online Feed Validation | How to check Validity of RSS / Atom Feed

The given feed validation service is free of cost and provide syntax checking service for atom or RSS feed. Along with this service there is HTML validation service also available at W3C site. HTML Validation service verify for all the tags used in a given HTML page and if any error found, This service will respond with exact line number and tag error description.

 

 

How to validate Feed online:

Feed Validation

Monday, March 29, 2010

Free Broken Link Checker - Website Testing - W3C

Free Broken Link Checker - Website Testing - W3C

Broken Link Checker is very good tool to test website and find out broken links in all over website.

This is free tool provided by W3C and their is no limit to test website.

Just go to the W3C official link and type your website name to test and click on check, The results will appear after some time, Depends on site volume. the results will display broken links and their error status as shown in figure.

What results include:

List of broken links and other issues

List of redirects

Anchors

Processing

There is number of options:

Summary only – Gives the only summary of results.
all for directories only – Can check for all files and folder or for directories only
Don't send the Accept-Language header – Do not sends Language header
Don't send the Referrer header – do not sends Referrer header for testing 
Check linked documents recursively, recursion depth: Specify recursion depth
Save options in a cookie – Would like to use cookies or not.

This Link Checker looks for issues in links, anchors and referenced objects in a Web page, or recursively on a whole Web site. For best results. The results will be good if you first use the Valid (X)HTML Markup to check HTML tag validation.

 

How to Check:

Broken Link Checker

Wednesday, March 24, 2010

Latest Test Plan Interview Questions

Ques: List the key elements of Test Plan?

or

What test plan should contains?

The key elements for a test plan are:
1.The requirement documents based on which the plan is developed. Like BRD,FRD
2.Testing environment
3.Test data

Ques: What is test strategy?

1. It Describe How to Test 
2. It Define the methodology quality analyst finalizes test Responsibility Matrix on the basis of testing policy and this is done by QA.

Ques: Define test Plan?

Test Lead or project lead develop test plan. this phase starts after the SRS and other business knowledge gathering. Test Plan describes what to test1.What is Scope of test
2.What is Approach to test.
3.What are the modules to test.

Ques:  What is the difference between Master Test Plan and Test Plan?

Test Plan: Test plan we write for each module (Both for black box and white box testing).It contains test cases,strategy that is being used and any stubs that are involved to test that particular module.

Master Test Plan : The MTP is required in all projects. The MTP is applicable for all the projects. It have details about all modules testing , the time frame, the resource, hardware dependencies, and any training required. It also involves a block diagram showing how the testing takes place.

Ques: What are Standards for Software Test Plans?

There is number of standards for test plans, IEEE also defines the test plans.

IEEE standards for test plans:

829-1983 IEEE Standard for Software Test Documentation

1008-1987 IEEE Standard for Software Unit Testing

1012-1986 IEEE Standard for Software Verification & Validation Plans

1059-1993 IEEE Guide for Software Verification & Validation Plans

Tuesday, March 23, 2010

Manual Testing Common Interview Questions 2010

These are some Manual Testing Common Interview Questions asked in  2010.

What's an 'inspection'?

What is a 'walkthrough'?

What is verification? validation?

What is Risk Analysis? Types of risks?

Describe your QA experience?

What steps are needed to develop and run software tests?

What's a 'test plan'?

What should be done after a bug is found?

What is End-to-End testing ?

What makes a good Software QA engineer?

What's the role of documentation in QA?

Please explain test matrices?

Explain the difference between system integrated testing and integrated system testing and Manual Testing?

What is Entry Criteria & Exit Criteria?

What is Soak Testing ?

What’s the User acceptance testing ?

What is Unit Testing?

What is Stress Testing ?

What is Security Testing?

What is Scalability Testing ?

What is Sanity Testing ?

What is the Regression testing ?

What is the Re-testing testing ?

What is Performance Testing ?

What is Negative Testing ?

Manual Testing Interview Questions

Ques. Why manual testing is preferred by number of Software companies while good automated tools are available in market?

1. High per-test or maintenance costs are one indicator that a test should be done manually.

2. Need of human judgment  to access the correctness of results, always need human interfere to judge a result.

3. Some times need to install the number of software's and hardware for a testing tool.

4. Sometimes need to reconfigure the system and network, Like operations and maintenance testing.

5. To read the documents and check results we always need humans.

Ques. How many types of CMM levels?

CMM is describe level 3 or above.

Level 3 - Defined
It is characteristic of processes at this level that there are sets of defined and documented rules and standard processes established and will be positive changes over time.
Level 4 - Managed
It is characteristic of processes at this level that, using process metrics, management can effectively control the AS-IS process (e.g., for software development ).
Level 5 - Optimized
It is a characteristic of processes at this level that the focus is on continually improving process performance through both incremental and innovative technological changes/improvements.

Ques: What's the role of documentation in QA?

1. Should be document so that it can be repeatable.

2. Specifications, designs, business rules, inspection reports, configurations, code changes, test plans, test cases, bug reports, user manuals, etc. should all be documented, So that new team member can easily understand and old members can remember.

3. To track the changes and versioning.

4. To Reproduce the bugs.

5. To Test the application as per user requirement.

Tuesday, March 16, 2010

QTP Interview Questions 2010

Q. Tell me the features and importance of Quick test professional(QTP)?

1. Key word driven testing
2. Suitable to web applications
3. Vb script as the script language
4. Better error handling mechanism
5. Excellent data driven testing features
6. Record and playback
7. to store a values we can use runtime data table
8. Auto documentation

Q. Can a QTP user can increase or decrease active screen information with the test?

Yes, user can store.

Q. What are the limitations of QTP?

The limitations listed below are specifically for QTP 8.2:

Maximum length of name—255
Maximum length of format string—255
Maximum number of tables (workbooks)—Limited by system resources (windows and memory)
Column width—0 to 255 characters
Text length—16,383 characters
Formula length—1024 characters
Number precision—15 digits
Largest positive number—9.99999999999999E307
Largest negative number— -9.99999999999999E307
Smallest positive number—1E-307
Smallest negative number— -1E-307
Maximum number of names per workbook—Limited by available memory
Maximum worksheet size—65,536 rows by 256 columns

Q.What are the QTP Script Coding Standards?

at the start In Header section of QTP you have to declare these items

***Header Section of the QTP you have to Mention*****

1.Name of the Script
2.Name of the Test case
3.Name of the Reusable scripts
4.Path of the Excel sheet
5.Version
6.Name of the Tester
7.Change History

*******************************

Then you have to follow Naming convention for each of the script that you will create in QTP.Like Y_TRA_AGIALANT_FINANCE_01

*******************************

You have to follow coding standards for the variable that you will declare in the QTP script

Like For all the

Integer type variable the name should start with int

Character type variable the name should start with Char

Boolean type variable the name should start with Boo

String Type variable the name should start with Str

*****************************************************

Then throughout the QTP script you have to mention that what you are doing actually. Like

**Here you have to mention in the script what you are doing ** Like

**Clicking the yahoo signin button to Login **********

Browswer(Yahoo page).Page(Yahoo_1).Button(Sign_in).Click

*************************************************

Coding standard are used for readability and better understanding.

Sunday, March 14, 2010

Record QTP Script in Video | Video Tutorial to record QTP Script

Here is solution of a good questions that how to record QTP Script in video.

1. How to record QTP script for Web applications
2. What record and run settings should be used to run and execute QTP script
3. How to replay/execute QTP script

Website Testing Interview Questions

Q. How can you test a website or a web application manually without using any automation tool?

We can test web applications and website manually but it can be error prone and time consuming. while using automation tools can give us lot of flexibility and stability. for automation tools we can use QTP or win runner.

Q. what is mean by client and server?

When software provide a screen to access on client machine and all logic runs on server, The same application is called client server model.

Q. How to test Browser compatibility testing
Testing the web application with multiple browsers (like IE,Netscape navigator,Mozilla Firefox etc) is called browser compatibility testing.

Q. What are problems while testing web application?
server problems(ie server down or under maintenance)Hardware problems
DataBase problems
Client machine do not have specific configurations
Browser compatibility

Q. Difference between CLENT-SERVER application and a WEB application testing?

Web Server
1. Web server serves pages for viewing in different web browsers.
2. Web server exclusively handles http requests and give response to requests.
4. Web Server serves static HTML pages or gifs, jpegs, etc., and can also run code written in CGI, JSP etc.

Application server
1. Application Server provides exposes business logic for client applications through various protocols
2. Application server is more capable of dynamic behavior than webserver. We can also change the configuration settings of application server to work as a webserver.
3. An Application Server run all the business logic.

Q. How to launch a application in winrunner using a command?

invoke_application("file_path"," "," ","sw-show)
system.util.run("file_path")
these are 2 commands is used to launch application in Winrunner from command. press F7 in Winrunner search for invoke command.

Q. What is the test cases for URL Testing?

Test Objective/Description  -- To Verify the URL Address
Test Procedure/Steps -- 1. Open Internet Explorer. > 2. Enter valid URL in address box. > 3. press Enter.
Expected Result -- URL should be open with website properly.
Actual Result -- URL Open properly.
Comment -- Mention comments

Q.What is the popular scenarios to test a website?

These are popular scenarios:
1.Functionality testing
2.Performance Testing
-Load and Stress testing
3.Security Testing
4.Usability Testing
5.Compatibility Testing
6.Interface Testing

Unit Testing Interview Questions

Ques. What is Unit Testing?

A. Testing of individual component of software.

Ques. At what phase of SDLC, Unit Testing Starts?

A. Unit testing starts with coding phase simultaneously after design phase.

Actually, Unit testing is performed by Developers. And it is done, once they are done with the completion of their code development. Like whenever code is done for a module or a project the unit testing starts, even you can do unit testing of a page also.

Ques. How you prepare Test data in unit testing process???

A. Preparing proper test data is a core part of any testing process. a developer or tester can develop a test data as per project requirement. Either it can be a production data or any dummy data. It is responsibility of a tester or developer to prepare good data for unit testing process. Tester should create his/her own test data additional to the existing standard production data. Your test data set should be ideal in terms of cost and time. Design our test data considering following categories:

Test data set examples:
1) No data: Run your unit test on blank or default data. and check if proper error messages are generated.

2) Valid data set: Create it to check if application is
functioning as per requirements and a valid input data is
properly saved in database or files with out any error.

3) Invalid data set: Prepare invalid data set to check
application behavior for negative values, alphanumeric
string inputs (Negative unit testing).

4) Illegal data format: Make one data set of illegal data
format. System should not accept data in invalid or illegal
format. Also check proper error messages are generated.

5) Boundary Condition data set: Check Data if it is out of range. Identify application boundary cases and prepare
data set that will cover lower as well as upper boundary
conditions.

6) Data set for performance, load and stress testing: This
data set should be large in volume.

This way creating separate data sets for each test
condition will ensure complete test coverage.

Some Other Unit Testing Questions:

Q. What would be the Test Objective for Unit Testing? What are the quality measurements to assure that unit testing is complete?

Q. What is use of NUnit for unit testing?

Q. How to do unit testing with Visual studio team system?

Q. What are the Phases of Unit Testing?

Unit Testing with Visual Studio Team System 2008

Unit test is use to test the newly created program by Developers and Testers. You can create a Unit test and use it multiple time.

After Creating a unit test, a separate unit test file is created for each class that you are testing. A unit test file have test method for each method that you are testing.


These are some unit testing videos demonstrating the exact definition of unit testing with vsts 2008.

Sponsored Ad

Related Software Testing Articles

Development Updates

Tech Updates