Sunday, April 15

RPT : Extracting value based on the occurrence that is passed dynamically

Rational Performance tester does correlation by extracting dynamic values in response by creating a reference. But it lacks ability for an user to specify if the occurrence dynamically that needs to extracted .
For ex: Say in an application, after user logins , he views displayed list of cards. He picks first card which is default and picks any other card alternatively sometimes. You got a task cut out to create a script which picks 60 percent default card and other 40 percent of time any of the alternate cards. You cannot select 'Random Occurrence ' option because it defeats purpose of simulating default card 60 % of time or vice verse.

So to overcome the limitation in RPT, one has to find a way to pass the occurrence you want to pick and pick the card by that occurrence value(not just random occurrence). Here in this blog I would focus on extracting that  value based on dynamic occurrence which is passed to a custom code interface . For this below are steps that need to be done

What does RPT Lacks for a Loadrunner User


    I have been a HP Loadrunner user most of the time for Performance/Load Test.  Off late, I ventured into task  to use IBM Rational Performance tester (RPT). I did had very pleasant surprises from this tool . Below are few of those to mention
  1. Automatic correlation feature got me quite amazed when it worked flawless all the time. RPT Uses Perl type of regular expression patterns to extract data from respone.  I was impressed with perl regular expression back in time when I first used Jmeter and still find they give robust way of defining pattern. RPT does all related to automatic extraction expression pattern, instance number etc. Thus makes life easy when creating a new script.
  2. Not just records thinktime, also records client processing delays . Hence represents right way of simulating secondary requests

  3. But I find that many features ,which are very common to Loadrunner or any scripting tool, are missing here in RPT. RPT does make maintaining scripts bit harder without simple scripting interface . Below are the few of those missing features that made RPT annoying to me at times.

Rational Performance tester(RPT) custom code to log user value fom datapool


Below is the custom code in Rational Performance tester that I managed for logging username value from datapool into test log. In Loadrunner, very often one uses commands like lr_message,lr_log_message to log username that was used by a particular virtual user in particular iteration. This helps performance tester to check whether the data was used was appropriate one, of if error occured, then what was the data used by the users etc. This this can be achieved in RPT by writing custom java code.
Custom  Code class implements interface ICustomCode which has method called exec with method parameters of object type ITestExecutionServices and type String array
The trick is understand the classes/method/interfaces of this Interface ITestExecutionServices. This object has information about a virtual user in interface name IDataArea . Below is the syntax to retrieve this Virtual user dataarea.

Monday, October 31

Executing Selenium TestNG tests using ANT

ANT is software build automating tool for Java code. Uses XML file named ‘build.xml’ as the input for the build tasks. If one wants to run TestNG task using ANT, XML should contain information for testng calls and this can be built in two ways
1. By defining a external task of type TestNG and referring this task in another target ANT call further down in the code
2. By defining as Java command in ANT XML
The command line syntax to run TestNG task is   java org.testng.TestNG testng1.xml [testng2.xml testng3.xml ...]. The second option takes this approach of calling testNG using command line syntax but using ANT. Lets have look at the first option here in this post

Monday, October 24

Running Selenium TestNG test from command line

When I tried to run TestNG command from command line, I get following error. This is mainly because java cannot find class path and jar file of TestNG
C:\Selenium\Selenium_tests\DemoProject java org.testng.TestNg
Exception in thread "main" java.lang.NoClassDefFoundError: org/testng/TestNg
Caused by: java.lang.ClassNotFoundException: org.testng.TestNg
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.testng.TestNg.  Program will exit.
C:\Selenium\Selenium_tests\DemoProject 
So below are the steps to get it working

Friday, May 7

How to retrieve the test sets - test instances - results within particular folder/path in Quality Center

Many times , you would be running the tests in multiple test sets and with multiple instances. Those multiple test sets would be in different folders under and under different hierarchy
Quality center has option to get this information using Analysis graphs, and thus you would be able to find what is the progress of each test set. But is has its own limitations. Like, if you want to find which test in each of sets is failed, or who has been the responsible tester for those tests , or any more information, then we are handicapped using Analysis reports.
Well , if you learn the excel reports, you life would be made easy. I have briefly mentioned on How to access excel reports in one of previous blog

So how shall we do go ahead?

Wednesday, May 5

How to retrieve requirement - test case - linked defect using excel reports

QC 9.2 has feature called excel reports. This feature is very versatile as you can retrieve complex data which simple reports or graphs from QC will not be able to do. One of the report that may be useful for any testing project is to find which all defects are linked to test cases and these test cases are covering which of the requirements. This will give you data that can be used to address which defects are more severely effecting your testing progress and resolving a defect what requirements/test cases you can quickly progress.

Here below is entity relationship diagram that you can find in HP quality center database reference. It is one of the help documentation available in QC.

For folks who not sure how to access excel reports in QC , follow below steps you will be amazed to find this feature.

Login into QC with project and domain. Then click on Tools and next select excel reports. It will open up another window. In the top menu , there is + button which on clicking will open report. You can make that report public or private.

TEST - REQUIREMENT ER DIAGRAM

Sunday, May 2

First time fix failures or Reopen defect from QC

In quality center, for your project analysis, it would be useful to find how many defects reopened. As you might be aware that , due to defects and not so good work from developers, your testing progress gets hampered. But how will you be able to quantify like the defects most of them were reopened and users had to do more of regression and testing? For this, metrics of Reopen defect is quite good and will justify that there was more of testing required than expected.

Saturday, May 1

How to retrieve Quality center bug details ?

The main table in quality center for defect related info is Bug table. This table stores all the recent /current bug details . There are few columns within this table which would of your interest. Below are columns for reference

BUG.BG_SUMMARY /*Defect.Title*/
BUG.BG_RESPONSIBLE /*Defect.Assigned To*/
BUG.BG_CLOSING_DATE /*Defect.Closing Date*/
BUG.BG_DEV_COMMENTS /*Defect.Comments*/
BUG.BG_DETECTED_BY /*Defect.Detected By*/
BUG.BG_DESCRIPTION /*Defect.Description*/
BUG.BG_BUG_ID /*Defect.ID*/
BUG.BG_USER_32 /*Defect.Defect Status*/
BUG.BG_PRIORITY /*Defect.Priority*/
BUG.BG_PROJECT /*Defect.Project*/
BUG.BG_SEVERITY /*Defect.Severity*/

Wednesday, April 28

QTP Actions VS Functions

 There has been debate over on whether to use QTP actions or Functions. Before presenting my opinion, let me present what they are and how they stand out.



QTP actions
- Are of three types Non reusable, reusable and external.
- Each action has local respositary associated with it
- Each action has local datasheet attached with it
- Each action call has to be inserted and cannot be dynamically called. There is concept of having relative path with QTP components, but it hardly works consistently with QC ( Where you require most as it is difficult move scripts around in QC)
* In QTP 10, there is new feature introduces which is called LoadandRunaction. There gives relief to folks who were using relative path for referring actions or have storage and development of scripts in different location

Monday, April 26

Simple VB Script that interacts with QTP and excel

'HI..here in this tutorial we gone try how to create a VB script which
' launches qtp and open the test which you have specified in the excel


'First we shall create a constant that points to the excel where it is located
' in local drive


Saturday, April 24

VBScript - 8 .Run the test

This is last blog related to creating Batch run VBS script. Here there are few simple steps you need add at the end so that QTP application, which has been opened, connected to QC and has test loaded , needs to execute the test.


In previous blog Set Test results options we created ObjresultOpt object. Assigned it which instance the result should be stored. Now comes its actual use where in you tell the QTP to run it with this options.



How to get started of VBscripting for QTP automation

For many who want to more of automation and just know how to use QTP a bit,  I thought i will just write few things you can start off which helped me to learn more of VBscript. 
I refereed book VBScript Programmer's Reference most of the time while learning. It helped to master things a bit


Friday, April 23

VBScript - 7 .Set Test results options


Set objResultsOpt=CreateObject("QuickTest.RunResultsOptions")    'Set Result options
objResultsOpt.ResultsLocation = ""
objResultsOpt.TDTestSet = QC_TEST_SET ' Test set name'
objResultsOpt.TDTestInstance = Instance ' Test instance in the test set. Generally it is one unless you have pulled the same test twice in same test set.
appQTP.visible=True
  


VBScript - 6 . Setting Global Options of QTP script

Here below parts of code, we will look at important setting you ought to do have better QTP execution.

Part 1
Set objTest=appQTP.Test.Settings.Run    'Set Run time settings
objTest.ObjectSyncTimeOut="60000"
objTest.IterationMode="oneIteration"
objTest.OnError="NextIteration"



Quality center QC not working in IE8 - windows XP/ Vista / Windows 7

Quality Center not working in IE8 - Win XP or How to Disable Data execution prevention (DEP)?

DEP is enabled by default in IE8 for win xp . This prevents code from running in memory that is marked non executable ( I guess QC or QTP does have some sort of this kind of code or IE is not analysing the code properly) . Hence the QC would not be able to run.

SO how to disable DEP this?

Advantages of Automation


                                                     
  •                                                         Time consuming                      Speed
  •                                                         Low Reliability                        Highly Reliable
  •                                                         Inconsisent                              Reusable
  •                                                        More Human resources            Programming capability
  •                                                                                                        More Coverage
  •                                                                                                        Repeatability

Thursday, April 22

VBScript - 5 Assign Test Parameters to QTP script

This blog is in sequence with my previous blogs and they are shown below.

VBScript - 1 . Launching QTP
VBScript - 2 . Connecting to QC/Open QC test
VBScript - 3. Add Resources of the Script

Here we shall look how to intialize the test parameters.

ISTQB Info

ISTQB- International Software Testing Qualifications Board

Why ISTQB required?

Although like  for all certifications, you may get very question that would arise is it worth taking and certifying yourself about the knowledge you already know,  but this would does make the other person ( your manager, interviewer, etc.) think are very much capable. Though in India , where there are not many professionals who would have had the certification, but it certainly puts you conspicuous in a lot. Would surely help the other person that you would make difference.

Monday, September 21

---------------------------------------------

Related Posts Plugin for WordPress, Blogger...