Posts

Showing posts from July, 2013

ALM and BPTWrapperTest

Image
Problem : Unable to run a few tests in ALM 11 that were executing before the upgrade

Solution: The reason is named “BPTWrapperTest” that takes a BPT test - downloads all its components - and generates a single QTP “BPT Wrapper” test to run.

Why?: BPT performance issues that were seen in QC10.
Issues: Mostly data related tests break when running BPT in ALM11.

Workaround: Disable this feature from the System Registry and modify the registry key value of UseBPTWrapperTest to ‘N’.

Here is the path of the registry key in Windows 7/ iSpace:
Win 7/ iSpace == HKEY_LOCAL_MACHINE >> SOFTWARE >> Wow6432Node >> Mercury Interactive >> Test Director >> BPT >> UseBPTWrapperTest
Dont like the workaround?:
Change Environment(“TestName”) to Environment(“ActionName”)

DataTable.Value(“test”) to DataTable.Value(“test”, Enviroment(“ActionName”))


Tip: The only reason you are not able to not find the BPT path in the registry is that you are not looking in the right place. Che…

Intellection on managing automated tests with frequent releases / versioning

Image
Problem: Group of products that are separate but related, and are periodically released (i.e. versioned).

What is required: Automated tests to run from the start of the suite against all different versions, meaning that the current state of our master test code branch should run meaningfully against arbitrary versions of the production builds.

Solutions:

1. Include version detection and an internal listing of features per build. Benefits here include making the test simpler because if the version list says feature X isn't part of it, the script never checks feature X, and the presence of a 'feature oracle'. Drawbacks are that it's more complex to implement and maintain, since the feature/version matrix has to be correct and up to date or you could have features not being tested (if the oracle says the feature is from a later version or is missing the feature entirely) or tests failing (if the oracle says the feature is from too early a version).


2. Build feature det…

Useful Firefox add ons for Software Testing

Image
I have recently been testing a lot on firefox  and that led me to find a few Add-On's which can make our testing smarter and faster!

After exploring further here is a list in no particular order , just depends on what your intent of testing is:

1. YSlow with FireBug: YSlow gives the no of page components for a particular page with Response time for each. It also gives grading and summary of what things are required for good performance.


2. Tamper Data: Used for web security/penetration testing. Install this feature and tamper the data/request/cookies being sent to the server. Check for client side and server side validation.You can security test web applications by modifying POST parameters.


3. SQL Inject Me: SQL Inject Me is used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack. The tool sends database escape strings through the form fields. It the…

QTP incompatible with Eclipse or any similar Java Application

Image
There are more than a few reasons that you want both QTP and eclipse on your machine.

REASON: This is an issue with QTP, which adds some Java hooks globally, this breaks Eclipse at start time. Removing these will break QTP
When QTP is installed it creates/modifies several environment variables that Java applications use.

The setting for these values that are needed for QTP may cause problems for other Java applications, such as Eclipse.

There are scenarios where QuickTest Professional (QTP) java support environment variables (_JAVA_OPTIONS, JAVA_TOOL_OPTIONS, IBM_JAVA_OPTIONS, _classload_hook) prevent specific applications from launching or functioning properly.


SOLUTION:There are some suggested workarounds from HP in the following support doc: (http://support.openview.hp.com/selfsolve/document/KM834284).
Suggestion three is worth trying and does not require updating HKLM registry.


These suggestions will allow to work around this situation even with the QTP java support variables in p…

Skillset - Firefox OS Test Automation Engineer

Image
Note: the Skillset category is just to gauge where you stand in terms of the skills required for the role



The Mozilla test automation infrastructure runs hundreds of thousands of  tests on every code push. And we have hundreds of pushes a day. Our infrastructure tests everything from performance to rendering
correctness to platform robustness. We are expanding that infrastructure for Firefox OS, which involves porting existing harnesses, creating new ones, adapting infrastructure to work with the
new platform, debugging and triaging failures, and striving to meet the test automation needs of a dynamic and growing development organization.

As part of the Automation & Tools team, your work will involve crafting and troubleshooting the next generation of test automation for our Firefox OS product. This includes Marionette, our  WebDriver-inspired remote test driver. Your responsibilities will include adding new features to Marionette, debugging Marionette-related issues, and develo…

Unable to close modal dialog webdriver - org.openqa.selenium.unhandledalertexception modal dialog present

Image
There are times when you are not able to close a simple modal dialog in IE/Firefox
Mostly an error stating "org.openqa.selenium.unhandledalertexception modal dialog present"

Solutions:

These might not work:

Alert alerts = driver.switchTo().alert();

alerts.accept()
alerts.dismiss()
Since this works only for alerts.

driver.switchTo().window()

this method to a window with know name.

Alternative:


Actions action = new Actions(driver);
action.sendKeys(Keys.ESCAPE);


These might work:

"webdriver.getwindowHandles()" - to obtain a list of know windows. you may pass the handle to
"switchto().window()"

windowids = driver.getWindowHandles();

iter= windowids.iterator();
String mainWindowId=iter.next();
String popupWindowId=iter.next();
driver.switchTo().window(popupwindowid);


Alternative:

String mainhndl = driver.getWindowHandle();

//Code that brings up the popup
Set handles = driver.getWindowHandles();

for(String handle: handles)
{
  If(!mainhndl.equals(handle))
  {
     …

XPATH for IE / internet explorer

Image
How to get XPATH for Internet explorer?
Alternate for firebug in Internet explorer?

If you are using selenium and your application works only on Internet explorer , the biggest challenge that one faces is to get the XPATH and validate the same, here is a neat workaround that uses javascript injection to get you the desired xpath:

Open IE in a new browser with a blank pageAdd a new Favorites and name it XPATH1Open the Favorites menu and right click the newly added favorite and select properties option.Select the web Document Tab. Enter the following in the URL field: javascript:function getNode(node){var nodeExpr=node.tagName;if(!nodeExpr)return null;if(node.id!=''){nodeExpr+="[@id='"+node.id+"']";return "/"+nodeExpr;}var rank=1;var ps=node.previousSibling;while(ps){if(ps.tagName==node.tagName){rank++;}ps=ps.previousSibling;}if(rank>1){nodeExpr+='['+rank+']';}else{var ns=node.nextSibling;while(ns){if(ns.tagName==node.tagN…