Total Pageviews

Tuesday, October 28, 2014

Merge multiple TRX files (Visual Studio Test Result File)

TRX files are  Visual Studio test results file. For any reason, if you end up having multiple TRX file you still can merge all of them into one file using utility given below. Multiple TRX files can generate as a result of test suit failing and a re-run is required when only failed cases are executed.

Merge TRX files- (only 2 files at a time)
  1. Download this utility
  2. Copy all TRX files in the same folder
  3. USAGE: trxmerger.exe <input1>.trx <input2>.trx <output>.trx
Note: Pick up the TRX file which was created first (Check time stamp) and then move to the next one.Changes from second trx file will be overwritten on first if there are matching test cases.The merged file then can be merged with next one and so on.

Convert TRX file into more user friendly format like HTML-
  1. Download this utility
  2. USAGE:  VSTSTestReport.exe  "C:\<filename>.trx" <filename>.html



    Cheers!
    Abhay

Wednesday, September 24, 2014

Mobile Automation: Appium/AVD/Android/Windows - Device not found error,restarting adb server.[solved]

Platform: Windows 7 64 bit
Appium Version: AppiumForWindows-0.16
Android SDK:  adt-bundle-windows-x86_64-20140702

If anyone is working on Appium automation and trying to pull up some automation on Android/Apple and if you run across any errors like below-

debug: Checking whether adb is present
debug: Using adb from C:\AndroidSDK\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway

This is most probably because appium/adb cannot read (and eventually expand)Windows System32 folder. Do following steps-

1. Open  command prompt and type "path" (no quotes).
2. Check if this path is present- C:\WINDOWS\system32. If not, go to step 3.
3. Add path like this in your system variable-  %SYSTEMROOT%\System32

PS: This worked for me, try your luck!

Cheers-
Abhay

Sunday, April 6, 2014

Effort estimation for Performance Testing

A lot of time you need to have a quick answer on questions like-

1. Total man force is required to execute this performance task?
2. How many hours are required on different project activities?
3. How many person days are required for individual project activities

and many more questions that are hard to answer (specially in short period of time).

Attached is an estimation template which can make your life bit easy and is a good place to start with- The results would be in terms of "efforts required by single resource". There are 3 tabs in the spreadsheet: "Estimation Summary" "Timeline" "Assumptions".

To start with first have a look at Timeline tab. It has been designed "With single resource". It is actually a simple table with Activities and Time. Activities are very generic and should hold true for most of the projects-
  1. Requirement/Application Analysis, KT 
  2. Test Planning
  3. Test Setup
  4. Test Design
  5. Test Development
  6. Iterative Test Execution & Analysis
  7. Summary Report Preparation
  8. Test Management
and time is divided into week1..week2..etc.

All you need to do is select color coding for different activities in terms of single resource and switch to "Estimation Summary" tab.

Estimation Summary tab will give you a nice overview of no of hours required by individual activities and person days. (Assuming 1 person day=8 hours).

Now fly and enjoy the template!

Cheers!
Abhay

Wednesday, March 5, 2014

Test Approach: Agile + Kanban

The most common question that pops up is- Do we have any standard approach for testing a application in Agile + Kan ban environment. The answer is simple- No. To justify my understanding lets look at what is Agile and Kanban all about. We will then see what is the most working testing approach in such environment- (I have taken most of the references from Internet which means all the credit MUST go to original authors. For the references please see end of this document )-

Agile

  • People across functional areas (programmers, testers, technical writers, sales, services, product managers) all work together as one team rather than different groups working in 'stages'.
  • Everyone in the team falls into category of ‘developers’ as they work together to develop and improve a product.
  • Iterative development (work in short development cycles with focused objectives).
  • Incremental development (frequent releases to client) .
  • Focus on human communication 
  • High visibility of team's progress to management, stakeholders, clients  using daily stand ups.
  • Continuous feedback from customers and stakeholders.

Kanban

  • You’ll find a lot of terminology in Lean software development comes from Japan and from the Toyota Production System in particular. Kanban translated literally: “Kan” means visual, and “ban” means card or board.
  • Kanban is a new technique for managing a software development process in a highly efficient way. Kanban underpins Toyota's "just-in-time" (JIT) production system. Although producing software is a creative activity and therefore different to mass-producing cars, the underlying mechanism for managing the production line can still be applied.
  • Kanban is incredibly simple, but at the same time incredibly powerful. In its simplest incarnation, a kanban system consists of a big board on the wall with cards or sticky notes placed in columns with numbers at the top.
  • Limiting work-in-progress reveals the bottlenecks so you can address them. Limitations that we saw in previous slides can be taken care of by Limiting work-in-progress.
  • The cards represent work items as they flow through the development process represented by the columns. The numbers at the top of each column are limits on the number of cards allowed in each column.
  • The limits are the critical difference between a kanban board and any other visual storyboard. Limiting the amount of work-in-progress (WIP), at each step in the process, prevents overproduction and reveals bottlenecks dynamically so that you can address them before they get out of hand.

Test Approach in Agile + Kanban 
  • Create just ONE document- Overall test strategy. No one reads test plan during sprint execution.
  • Test strategy should be important to the devs, testers, product owners, automation creation & maintaining folks
  • Test strategy should have - which exploratory test charters are planned during the current sprint and put that into the Test column
  • Describe a loose framework that describes what we are going to do for stories, what we are going to do for integration, what we are planning to do for our exploratory testing that doesn't fit in to stories, and then when we are going to review our test strategy?
  • Write logical acceptance criteria.
  • How to handle backlog items?
  • Test strategy drives entire development team and explains HOW you plan to start testing
  • Each story assigned to the sprint should have test tasks in it, that becomes your defacto test plan.   


Tuesday, November 19, 2013

How to apply for HP LoadRunner exam? (OR HP exams in general)

I have seen so many questions around where people simply don't know on how to apply and appear for HP exams. See the flow below- (These steps are good for those who want to apply from India, for other countries please check the HP website)

1. Register with HP website and get your 'Learner ID' from them.Go to this link and register yourself-

http://h10120.www1.hp.com/expertone/partner_portal_access.html

2. After you get your learner ID go to this site and select the paper you want to appear-(Note down the name)

http://h10120.www1.hp.com/expertone/view_certifications.html

3. Once you have identified which exam you are interested in, search for exam centers of HP here-

http://www.pearsonvue.com/hp/

Pearsonvue are HP official partner for all exams.Register with them on their website.They will ask you for Learner ID from step 1.

4. Select the nearest exam center for yourself and pay fee to Pearsonvue on their website.

All the best!

Cheers!
Abhay

Monday, October 7, 2013

Resizing a Linux VM (Virtual Machine)

I have been using a lot VM's (Virtual machines) at my work place and there been lot of need to re-size the VM partition. Due to ever expanding data you end up having less space in your VM machines. Below i have compiled few easy steps to achieve it- (this will keep you away from Linux-hard-to-understand-commands-for-vm-resizing!)

IMP Point- If you have been saving SNAPSHOTS , they will have to be deleted first. Use the Snapshot Manager to do this.(Ctrl+M from main menu) (can take a while).

1.Change the VM settings
  • Change VM size -go to Settings - Hard Disk / Utilities / expand
  • Put in the required value-





2. Parted Magic (Take the pain to write DVD--you will breathe easy rest of your life!)

  • Burn a copy of Parted Magic to CD/DVD
  • ISO can be found here- http://partedmagic.com/doku.php?id=downloads
  • (Its FREE)

3. Boot from CD/DVD
  • Start the VM and boot to BIOS. See the picture below on how you can do it OR click into window and hit F2 as soon as VMware logo appears (you have to be quick)

  • Change bios boot order to CD_ROM first (use + and - keys on numeric keypad to move cd-rom to top of list)
  • Save and Exit bios
  • Boot from CD/DVD (Should boot automatically) (Make sure you have checked "Connect at Power on")
  • I have used "Use ISO image file" and path to file in the Physical drive.Screen shit below is different. Both should work.

  • Start Parted Magic with default settings (This will copy Parted Magic files onto RAM. Accept all default)
  • Go to Partition Editor (Located on desktop) and double click. Below is what you will get to see.
 4. Re-Size
  • Firstly you have to re-size the extended partition before the logical drive. Select the extended partition (in this case sda4)-
  • Click on  Resize/Move button.... (Move the slider from extreme ends by mouse,black arrows don't work)-Select Resize/Move and it will put it in queue.

  •   Now do the same for the logical drive (sda5) 
You should now have 2 items in the queue. Select Apply at the top.

4. Clean up
  • Log out or click turn off machine in Parted magic (bottom left corner) 
  • Go back to bios and change back to Hard Drive.
There you go! Enjoy VM with more hard disk space.

Cheers!
Abhay



Sunday, October 6, 2013

Copy files between Windows and Linux.

This is how you do it-

File transfers can be done using PSCP (Putty Secure CoPy) or by using PSFTP (Putty Secure File Transfer Protocol).

The easiest way i find is via PSCP (Putty Secure CoPy)-

1.  Download Putty here- http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2. PSCP must be launched from within a DOS box - Before running PSCP, you need to set the path variable.  At the DOS command prompt, type-

set PATH=C:\Program Files (x86)\PuTTY

(Change the path as per your directory structure.)

3. Type Path to check if it is been set correctly.
4.  To copy a Windows file to Linux system, at the DOS prompt, type-

pscp C:/ <full file name on windows>  root@<IP Address of Linux box>:/root

:/root will copy the files under root on linux box. Change as per your needs.

5. The reverse works as well (copy Linux file to Windows)

            pscp root@<IP Address of Linux box>:/root  c:/

Cheers!
Abhay

Handy Windows Screen Recorder

There are situations when you are required to document your steps. May be this tool from Windows is pretty useful. Windows call it "Windows Problem Steps Recorder".If you are using Windows 7 or 8, this is quite handy tool. This tool records each n every action on screen with screen shots.

Try out-

Go to Start Menu---> Run and type 'psr'.

You can Pause Start or Stop at any point of time. If you love batch programming you can call this program automatically as soon as your application under test starts.That's how i have configured it for my client. Check this for more info- http://windows.microsoft.com/en-nz/windows7/how-do-i-use-problem-steps-recorder

Enjoy!

Abhay

Monday, July 1, 2013

Your Computer does not support Long Mode. Use a 32bit Distribution- Any one got this? Check the solution.

I was recently working on a HP's Z820 workstation.I got this brand new chick with a NVIDIA K5000 graphic card. I started to make a list of heavy graphic games.I was flying high.

Very soon the boss came in-- (DEVILS!)

I was now given the task to configure this chick with virtualization environment.I was told to install and configure VMWARE workstation on it. The VMWARE should have the RED HAT 5. (Games!)

So story is i got everything configured and then booted the VM with RED HAT 5. As expected (and like my life) a long beep welcomed me saying that-

" Your Computer does not support Long Mode. Use a 32bit Distribution "

This was interesting. i rechecked all the configuration accept enabling the  VT (Virtualization Technology VTx) settings in BIOS.

This is how you can do it-

1. On your workstation enter BIOS.I pressed F10 to enter on my HP workstation.
2. Go to Security-->System Security-->irtualization Technology VTx
3. Enable it.
4. Save it.
5. Exit BIOS and reboot your machine.
6. Check if  RED HAT 5 is booting on VM
7. IF YES go to 9.
8. IF NO go to 10.
9. Have a chilled BEER!
10.Have another chilled BEER!

-Abhay (Hicc!)

Wednesday, June 26, 2013

How do you select a virtualization tool?

Based on my experience the only reliable way to see which tool is good for your application- is by doing comparative analysis- Here is the outline:



  • Installing the service virtualisation server
  • Architecture
  • License management
  • Creation of virtual services
  • Different ways to create virtual service 
  • Supported protocols
  • Creating virtual services
  • Managing the virtual services
  • Deploying virtual services
  • Stateful transactions
  • Self healing 
  • Data desensitization
  • Troubleshoot virtual services
  • Product support
  • Hardware Cost
  • Return on investment (ROI)
  • License modelStaff config
  Do drop your feedback or email if you something to share on virtualization.

-Cheers
AB

Setting .NET Filters (.NET Protocol,C#) in HP Load Runner

I have struggled a lot to understand how filters in .NET apps work- The below writeup has been adopted from HP Help.I found this write up useful to kick start your recording using .NET protocol. I am including this here for those who have limited access to documentation.This will give you a good idea about setting up filters for .NET protocol in Load Runner before recording- (All credits to HP please!) - AB


When testing your .NET application, your goal is to determine how the server reacts to requests from the client. When load testing, you want to see how the server responds to a load of multiple users.

When recording a .NET application, your script may include calls to methods that do not affect the server, such as calls to a local utility or the GUI interface. These calls are usually not relevant to your testing goals, and it would be correct to filter them out.

The built-in filters, .NET Remoting, ADO.NET, Enterprise Services, and WCF, were designed to record only the server related traffic relevant to your testing goals. In some instances, however, you may need to customize filters to capture your .NET application's calls or exclude unnecessary calls. Using the Filter Manager, you can design custom filters to exclude the irrelevant calls and capture the server related calls.

Before creating a test, i recommend that you become familiar with your application and determine its primary classes and methods, so that you will know which ones to include in your recording.

If you are not familiar with your application's classes, you can use Visual Studio or a Stack Trace to help you determine which methods are being called by your application in order to include them in the filter. VuGen allows you to record with a stack trace that logs all of the methods that were called by your application.

Once you determine the required methods and classes, you include them using the Filter Manager. When preparing a script, you may need to customize the filter several times in order to achieve the optimal filter. An optimal filter records the relevant methods without introducing a large number of irrelevant calls to the script.


PS: Note that if you plan to add manual code to your script such as control flow or message statements, make sure to do so after you have a functional script that runs inside VuGen. The reason for this is that if you re-record a script or regenerate the script, you will lose all of the manual changes.

Determining which Elements to Include or Exclude-
When designing a custom filter, we recommend that you start by choosing the appropriate built-in filter as a base filter. You can then customize the filter using one of the following approaches:

Top Down Approach. An approach in which you include the relevant namespace and exclude specific classes that are not part of the client-server activity. This is recommended if you are familiar with your application and you can identify a well-defined assembly which implements all client-server activity without involving any GUI elements, such as MyDataAccessLayer.dll.

Bottom up Approach. An approach in which you use the default filter and refine it by adding individual methods or classes. Use this approach if you cannot identify a well-defined layer or if you are not familiar with your application. Do not add all AUT assemblies and then try to remove extra component one by one.

The following section provides guidelines on when to include or exclude elements.

If, as a result of your including a class, your script has many unrelated method calls, try modifying the filter to exclude the irrelevant methods.

If you identify a non-client/server call in your script, exclude its method in the filter.

During recording, VuGen may detect an unknown input argument, for example, an argument whose construction it had never encountered before. If this argument supports serialization, VuGen serializes it by saving it to a file in a special format. During replay, VuGen reconstructs the argument by deserializing it.

VuGen serializes objects passed as arguments that were not included by the filter. We recommend that you include this object in the filter in order to track its construction and activity instead of using it in its serialized form. You can identify serialized objects in the script by searching for calls to the LrReplayUtils.GetSerializedObject method or, in WCF environments, LrReplayUtils.GetSerializedDataContract. VuGen stores serialized objects in the script's \data\SerializedObjects folder as XML files with indexes: Serialization_1.xml, Serialization_2.xml and so forth.

When no rules are specified for a method, it is excluded by default. However, when the remoting environment is enabled, all remote calls are included by default, even if they are not explicitly included. To change the default behavior, you can add a custom rule to exclude specific calls which are targeted to the remote server.

Arguments passed in remoting calls whose types are not included by the filter, are handled by the serialization mechanism. To prevent the arguments from being serialized, you can explicitly include such types in order to record the construction and the activity of the arguments.

Exclude all activity which involves GUI elements.

Add assemblies for utilities that may be required for the script to be compiled.

For information on how to include and exclude elements, see Filter Manager [.NET Protocol].

Defining an Effective Filter
When preparing a script, you may need to customize the filter several times in order to achieve the optimal filter. An optimal filter records the relevant methods without introducing a large number of irrelevant calls to the script.

Define an effective filter
Create a new filter based on one of the built-in filters. If you know that the AUT (Application Under Test) does not use ADO.NET, Remoting, WCF, or Enterprise Services, clear that option since unnecessary filters may slow down the recording.

Set the Stack Trace option to true for both recording and code generation. Open the Recording Options ( ctrl+f7) and select the Recording node. Enable Debug Options: Stack Trace and Code Generation: Show Stack Trace.

Record your application. Click Start Record ( ctrl + r) to begin and Stop ( ctrl + f5) to end.

View the script's steps. If you can determine the business logic from the steps and apply correlation, you may not need to create custom filters. If, however, the script is very long or hard to maintain or correlate, you should customize the script's filter.

Try to identify the high-level method in the call that captures or wraps one or more client server calls. You can do this by opening the AUT source files (if they are available) in Visual Studio or by viewing a Stack Trace of the script.

Set the filter to include the relevant methods—you may need to add their assembly beforehand. For tips about including and excluding elements in the filter, see Guidelines for Setting .NET Filters.

Record the application again. You should always rerecord the application after modifying the filter.

Repeat steps 4 through 7 until you get a simple script which can be maintained and correlated.

After creating an optimal script, turn off the Stack Trace options and regenerate the script. Open the Recording Options ( ctrl+f7) and select the Recording node. Disable Debug Options: Stack Trace and Code Generation: Show Stack Trace. This will improve the performance of subsequent recordings.

Correlate the script. In order for your test to run properly, you may need to insert a correlation to capture a value and use it at a later point in the script. For more information, see How to Correlate Scripts - Microsoft .NET.



Cheers-
AB

Wednesday, December 26, 2012

Load Testing using Service Virtualization

This is pretty interesting stuff that i have been working on-

First lets understand basics of Service Virtualization (SV)- In the later posts we will cover the Load Testing approach.

What is Service Virtualization?

Service virtualization involves the imaging of software service behavior and the modeling of a virtual service to stand in for the actual service during development and testing. Service virtualization is complementary to hardware virtualization, and provides a solution to address each of the aforementioned hardware virtualization limitations such as:

1. Providing 24/7 access to the service end point on your terms
2. Removing capacity constraints
3. Addressing data volatility across distributed systems
4. Reducing or eliminating the cost of invoking 3rd party systems for non-production use

So how does it go well with different application? What are the constraints?

Here are some constraints which Service Virtualization can overcome-

Access to a mainframe:
There are dozens of project teams, each needing access to the mainframe. Yet these teams receive very limited access, and often during timeslots that do not align to their project plan. This is a persistent problem that introduces risk, unacceptable delays, lost productivity and added cost.

Access to a database:
Another team owns a database that is accessed by others. This database is currently accessible in a development lab, but one team needs a new stored procedure added to that database. It may take 3 or 4 months with the DBA team in order to deploy those stored procedures.

Access to the web service:
There is a legacy system deployed and due to an architectural mandate, access to legacy system functionality will be provided via web services. However, no web service is available to test against, and not even an individual responsible for creating the web service.

How does SV works?

Following diagram can help us understand the basic on how SV can be captured?



As you can see in the above diagram-

A "service image" as a part of service virtulaization can be captured by some external tool during recording.The request and response of the application can be captured as a part of  service image.This service image then later be hosted and deployed on some server.The SI will then service the all the requests and send appropriate responses. This way when you run your script you are not hitting the actual site but just the Service Image !

Most of the tools available in the market has ability to work with common protocols listed below-

Transport protocol (Interface Protocol)
HTTP / HTTPS (Web Applications)
JDBC (Databases)
Messaging platforms (webmethods, Tibco, MQ, Sonic, JCAPS)
Standard JMS
From WSDL for HTTP / s

Data Protocol

HTTP Traffic (Web)
Web services (SOAP)
Protocol layer for handling messages over IBM MQ
Protocol layer for handling messages over JMS using JNDI

Available tools in the market?

If you do Google you will find many tools which can do SV. My personal favourite is ITKO LISA. Please find more information here.



Tuesday, August 21, 2012

Quick Start and Check- Script Recording in HP LoadRunner

Few useful pointers/Smoke Start - Script Recording in HP LoadRunner.

1) For a typical business scenario with login-action-logout,try recording Login part in Vuser_init, action part contains the actual functionality / navigation to be performance tested and Vuser_end contains the logout part. This enirely depends on the business scenario.It is also possible that you may record something else in vuser_init() as per your business requirement. As per good practice ensure proper transactions, comments are included in the script.

2) Once script recording is complete, replay the script with extended logging and data returned by Server enabled. This will help you identify any dynamic values which are returned by Server. Accordingly you would have to correlate the dynamic values.

3) Correlation - You can enable Auto-correlation if you are not comfortable with LoadRunner. But Autocorrelation may fail at times, hence Manual correlation is always preferrable.

4) Incase correlation is also complete, parameterize values like UserId, Passwrod and fields which would change for every iteration.Make sure you proper commnets in your scripts defininf what all changes you have made.

5) Once script enhancement is complete, execute the script for minimum 2 iterations in VuGen. Check whether all transactions pass.Check all the logs for any missing or broken links.

The above points will ensure that your first step is correct.Later in the script you can add more complex enhancements.

Monday, August 13, 2012

How to clear HP AIS - Loadrunner v11 certification?

There are few pointers that i would like to mention,these are essentially for people who aim to appear for HP AIS - LoadRunner v11 certification-

1. HP AIS Load Runner V11 consist of two papers-

Exam HP0-M48: HP LoadRunner 11.x Software
Exam HP0-M49: HP Virtual User Generator 11.x Software

Questions are multiple type with no negative marking. You get sufficient time to attend questions.You will need to clear both the papers in order to get certificate.

2. What to expect in question papers-

Exam HP0-M48: HP LoadRunner 11.x Software-In this paper questions are related to the LR software.Therefore it is important for candidate to have some hands on experience on LR. Questions range from navigation to listing of menu items. Unless you have seen the software thoroughly (and able to recollect) it would be hard answer questions. Questions where you get to see two or more graphs merged,and you are required to tell what kind of graph it is.Typically there are predefined graphs like layover and all in LR.

Exam HP0-M49: HP Virtual User Generator 11.x Software- In this paper questions are mostly related to run time settings,scripting and practical approach towards a problem.There will be a code snippet and user is expected to tell the output.

3. I will try to incorporate some sample questions in the next post.

Please feel free to contact me on - abhayanand.bhagwat@gmail.com

Cheers.



Friday, October 7, 2011

Hello World !

This is my first post.I am planning to make this blog as a one point stop for performance testing related questions and discussions.I will try to address the common challenges that a performance test engineer faces while using performance tools like Load Runner.I am very excited and would love to have views,discussions from people across the globe.Let's make this place a knowledge base.

Thanks for your time :)

Abhay
abhayanand.bhagwat@gmail.com