Software QA FYI - SQAFYI

Mercury WinRunner FAQ

Part:   1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32   33  34  35  36  37  38  39  40  41  42  43  44  45 

WinRunner: Should I sign up for a course at a nearby educational institution?
When you're employed, the cheapest or free education is sometimes provided on the job, by your employer, while you are getting paid to do a job that requires the use of WinRunner and many other software testing tools.
If you're employed but have little or no time, you could still attend classes at nearby educational institutions.
If you're not employed at the moment, then you've got more time than everyone else, so that's when you definitely want to sign up for courses at nearby educational institutions. Classroom education, especially non-degree courses in local community colleges, tends to be cheap.


How important is QTP in automated testing, does only with manaul testing (Test Director) is enough for testing. Or do we require automated tools in each and every projects. What are the different advantages of the QTP?

Most projects that are being automated should not be because they're not ready to be. Most managers assume that automated functional QUI testing will replace testers. It won't. It just runs the same tests over, and over, and over. When changes are made to the system under test, those changes either break the existing automated tests or they are not covereb by the changes.
Automated functional GUI testing is usually a waste of time.
TestDirector is not used for executing any actual test activity but it is a test management tool used for Requirements Management, Test Plan, Test Lab, and Defects Management. Even if the individual test cases are not automated, TestDirector can make life much easier during the test cycles.
These two are also good reads on the topic:
Automation Myths
Test Automation Snake Oil
You can find information about QTP here:
http://www.mercury.com/us/products/quality-center/functional-testing/...


Tell me about the TestDirector®
The TestDirector® is a software tool that helps software QA professionals to gather requirements, to plan, schedule and run tests, and to manage and track defects/issues/bugs. It is a single browser-based application that streamlines the software QA process.
The TestDirector's "Requirements Manager" links test cases to requirements, ensures traceability, and calculates what percentage of the requirements are covered by tests, how many of these tests have been run, and how many have passed or failed.
As to planning, the test plans can be created, or imported, for both manual and automated tests. The test plans then can be reused, shared, and preserved.
The TestDirector’s "Test Lab Manager" allows you to schedule tests to run unattended, or run even overnight.
The TestDirector's "Defect Manager" supports the entire bug life cycle, from initial problem detection through fixing the defect, and verifying the fix.
Additionally, the TestDirector can create customizable graphs and reports, including test execution reports and release status assessments.


What is a backward compatible design?
The design is backward compatible, if the design continues to work with earlier versions of a language, program, code, or software. When the design is backward compatible, the signals or data that has to be changed does not break the existing code.
For instance, a (mythical) web designer decides he should make some changes, because the fun of using Javascript and Flash is more important (to his customers) than his backward compatible design. Or, alternatively, he decides, he has to make some changes because he doesn't have the resources to maintain multiple styles of backward compatible web design. Therefore, our mythical web designer's decision will inconvenience some users, because some of the earlier versions of Internet Explorer and Netscape will not display his web pages properly (as there are some serious improvements in the newer versions of Internet Explorer and Netscape that make the older versions of these browsers incompatible with, for example, DHTML). This is when we say, "Our (mythical) web designer's code fails to work with earlier versions of browser software, therefore his design is not backward compatible".
On the other hand, if the same mythical web designer decides that backward compatibility is more important than fun, or, if he decides that he does have the resources to maintain multiple styles of backward compatible code, then, obviously, no user will be inconvenienced when Microsoft or Netscape make some serious improvements in their web browsers. This is when we can say, "Our mythical web designer's design is backward compatible".


Q: How to get the compiler to create a DLL ?

In the Borland compiler, Creating "Console DLL's".
A console application is one that does not have a GUI windows queue component. This seems to work well and has a very small footprint.


Q: How to export DLL functions so that WinRunner could recognise them?

Created the following definition in the standard header file:
#define WR_EXPORTED extern "C" __stdcall __declspec(dllexport)
and write a function it looks something like this:
WR_EXPORTED UINT WrGetComputerName( )
{
. . .
}


Q: How to pass parameters between WinRunner and the DLL function?

Passing Strings (a DLL function):
In WinRunner,
extern int WrTestFunction1( in string );
In the DLL,
WR_EXPORTED int WrTestFunction1( char *lcStringArg1 )
{
. . .
return( {some int value} ); }
And then to use it in WinRunner,
WrTestFunction1( "Fred" );
Receiving Strings:
In WinRunner,
extern int WrTestFunction1( out string <10>); #The <10> tells WinRunner how much space to use for a buffer for the returned string.
In the DLL,
WR_EXPORTED int WrTestFunction1( char *lcStringArg1 )
{
. . .
{some code that populates lcStringArg1};
. . .
return( {some int value} );
}
And then to use it in WinRunner,
WrTestFunction1( lcString1 );
# lcString1 now contains a value passed back from the DLL function

Passing Numbers (a DLL function)
In WinRunner,
extern int WrTestFunction1( in int );
In the DLL,
WR_EXPORTED int WrTestFunction1( int lnIntegerArg1 )
{
. . .
return( {some int value} );
}
And then to use it in WinRunner,
WrTestFunction1( 2 );
Recieving Numbers
In WinRunner,
extern int WrTestFunction1( out int );
In the DLL,
WR_EXPORTED int WrTestFunction1( int *lnIntegerArg1 )
{
. . .
*lnIntegerArg1 = {some number};
return( {some int value} );
}
And then to use it in WinRunner,
WrTestFunction1( lnNum );
# lnNum now contains a value passed back from the DLL function

Here are some example functions.
#define WR_EXPORTED extern "C" __stdcall __declspec(dllexport)
#define WR_SUCCESS 0
#define WR_FAILURE 100000
#define FAILURE 0
#define WR_STAGE_1 10000
#define WR_STAGE_2 20000
#define WR_STAGE_3 30000
#define WR_STAGE_4 40000
#define WR_STAGE_5 50000
#define WR_STAGE_6 60000
#define WR_STAGE_7 70000
#define WR_STAGE_8 80000
#define WR_STAGE_9 90000
#define MAX_USERNAME_LENGTH 256
#define HOST_NAME_SIZE 64
WR_EXPORTED UINT WrGetComputerName( LPTSTR lcComputerName )
{
BOOL lbResult;
DWORD lnNameSize = MAX_COMPUTERNAME_LENGTH + 1;
// Stage 1
lbResult = GetComputerName( lcComputerName, &lnNameSize );
if( lbResult == FAILURE )
return( WR_FAILURE + WR_STAGE_1 + GetLastError() );
return( WR_SUCCESS );
}
WR_EXPORTED UINT WrCopyFile( LPCTSTR lcSourceFile, LPCTSTR lcDestFile, BOOL lnFailIfExistsFlag )
{
BOOL lbResult;
// Stage 1
lbResult = CopyFile( lcSourceFile, lcDestFile, lnFailIfExistsFlag );
if( lbResult == FAILURE )
return( WR_FAILURE + WR_STAGE_1 + GetLastError() );
return( WR_SUCCESS );
}
WR_EXPORTED UINT WrGetDiskFreeSpace( LPCTSTR lcDirectoryName,
LPDWORD lnUserFreeBytesLo,
LPDWORD lnUserFreeBytesHi,
LPDWORD lnTotalBytesLo,
LPDWORD lnTotalBytesHi,
LPDWORD lnTotalFreeBytesLo,
LPDWORD lnTotalFreeBytesHi )
{
BOOL lbResult;
ULARGE_INTEGER lsUserFreeBytes,
lsTotalBytes,
lsTotalFreeBytes;
// Stage 1
lbResult = GetDiskFreeSpaceEx( lcDirectoryName,
&lsUserFreeBytes,
&lsTotalBytes,
&lsTotalFreeBytes );
if( lbResult == FAILURE )
return( WR_FAILURE + WR_STAGE_1 + GetLastError() );
*lnUserFreeBytesLo = lsUserFreeBytes.LowPart;
*lnUserFreeBytesHi = lsUserFreeBytes.HighPart;
*lnTotalBytesLo = lsTotalBytes.LowPart;
*lnTotalBytesHi = lsTotalBytes.HighPart;
*lnTotalFreeBytesLo = lsTotalFreeBytes.LowPart;
*lnTotalFreeBytesHi = lsTotalFreeBytes.HighPart;
return( WR_SUCCESS );
}

Part:   1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32   33  34  35  36  37  38  39  40  41  42  43  44  45 

Mercury WinRunner FAQ