Monday

Automating PDF with QTP just got easier!



There are many ways in which pdfs can be automated , since it's been some time that I automated pdf related stuff; I found some new ways that are easier:

Apart from the older methods like:

For Adobe Reader:

Set rdrObj= createobject("AcroPDF.PDF")

rdrObj.LoadFile("C:\test.pdf")

rdrObj.PrintAll

Set rdrObj= Nothing
Note: This approach is good but has few options and can only be used for purposes like printing contents of the pdf file.

For Adobe Acrobat:

Set acrObj = CreateObject( "AcroExch.PDDoc" )

If acrObj .Open( FileName ) Then
       PagesinPdf = acrObj .GetNumPages()
       Set acrObj = Nothing
Else
       PagesinPdf = -1
End If

Note:
  • Set acrObj = CreateObject("AFormAut.App")--to manipulate from pdf forms
  • Set acrObj = CreateObject("AcroExch.App")--creating acrobat application object
  • Set acrObj = CreateObject("AcroExch.AVDoc")--one avdoc object per displayed document.
The best method would be:

APTT - Adobe Pdf Test Toolkit

Like any other objects that are added in your Object repository, you would wish that there was a plug-in for adobe too. Here is the solution to that
  1. Download ADOBE APTT plugin.
  2. If you install ADOBE APTT plugin, QTP starts identifying the objects in PDF like any other object.
  3. This can be downloaded from: http://labs.adobe.com/technologies/aptt/


If the purpose is just storing all text in a variable simple and dirty solutions is :

You can open the PDF file do (Ctrl + a -> Ctrl + c ) or use getvisibletext
And get the contents from mercury.clipboard and store it in a variable.

Thursday

Cucumber - A testing tool?



A lot of test engineers in India do not know or have never even heard of a tool called cucumber, Jbehave is the alternative tool being used but not in big numbers. So for all my fellow testers here is an update on what is cucumber and why do we use it and where does it fit in the testing world ?

Cucumber is a tool for running automated acceptance tests written in a behavior driven development (BDD) style.
  • Cucumber is Aslak Helles√ły’s rewrite of RSpec’s “Story runner”, which was originally written by Dan North.
  • written in the Ruby programming language
  • The language that Cucumber understands is called Gherkin
  • Cucumber was the second most popular testing framework after RSpec in the Ruby Toolbox.
  • Best website to refer - http://cukes.info/
  • The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid - all rolled into one format.
  • While Cucumber can be thought of as a “testing” tool, the intent of the tool is to support BDD
  • Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language
  • Translated in close to 40 spoken languages
  • Cucumber also supports more succinct tests in tables - similar to what FIT does

To use Cucumber :
  1. You need Ruby installed.
  2. Then just run  gem install cucumber from a command prompt.
  3. Now, run cucumber --help
  4. The user describes the behavior of the system with natural language with some specific keywords
  5. The process starts with creating a feature file, which explains a feature of the system and some scenarios of different test situations.
  6. As Cucumber doesn’t know how to interpret the features by itself, the next step is to create step definitions explaining it what to do when finding that step in one of the scenarios.
  7. The step definitions are written in Ruby.
  8. It can use and already has step definitions for Webrat, an acceptance testing tool for Ruby, which simulates a browser without Javascript support. But it can also be combined with a web automation framework like webdriver / waitir.
Best place for tutorials:
  1. Wiki - https://github.com/cucumber/cucumber/wiki
  2. https://github.com/cucumber/cucumber/wiki/tutorials-and-related-blog-posts
  3. Some good sites for starters:
    1. http://blog.spritecloud.com/2010/03/web-testing-with-cucumber/
    2. http://cuke4ninja.com/sec_why_cucumber.html

Wednesday

Cucumber CheatSheet



After all the cheatsheets for QTP,  selemium, webdriver regular expressions, agile. Here is Cucumber:


Best cheatsheet is defnly:

cucumber --help


Output formats

Reporting

Notification formats, in increasing order of verbosity:

cucumber --format progress

cucumber --format stepdefs

cucumber --format html

cucumber --format pdf




--format rerun would be helpful, as it enables automatically re-running failing tests. However that is broken (but they're working on it) in Cucumber 0.5.1 as of Dec 21 2009.


--format junit would also be useful: it produces an XML report format like JUnit's. That report can be consumed by CruiseControl and numerous other tools. But that format also appears (I only checked on 1 machine so far) broken as of 12/22/2009.

Debugging

In order of usefulness.

cucumber --format usage --dry-run

cucumber --format tag_cloud

cucumber --format usage

cucumber --format debug

Note that usage performs profiling when invoked without --dry-run.

Dependencies

Most deps are installed automatically. But some must be manually installed:

gem install prawn

Prawn is needed for PDF output.

Test Automation + Geeks = Low Maintenance



Here are some amazing snapshots that will make you think and be proud to be an automation engineer:









Thursday

QC cannot run manual BPT components



Have you ever tried to run manual components in any version that supports BPT framework. You would be surprised that you get a wrong error message stating:

"Cannot run component xyz in busines process test xyz. This version of Quality Center does not support running components of the type MANUAL."

Really? No that's a wrong error message. What happens is QC is  it would always try to run the components automated first, even if the components in the test  are "manual" components.

Solution : When you go to run the test, make sure you click on the little black down arrow next to the Run button. From there select, "Run Manually"

All in One - HP changes the way we automate and test


  • Hewlett-Packard is incorporating three different components, previously available separately, into its HP Unified Functional Testing (UFT) automated testing application so developers can test all aspects of a multi-tiered application from a single interface.
  • The company will also offer a cloud service that will allow developers to test mobile applications.
  • UFT 11.5, due to be released early next month, has been updated to better accommodate this more rapid pace of development
  • UFT 11.5 simplifies the testing process by combining a number of different tests into one screen
  • Now, developers can test, from a single console, all three layers: the interface, the service layer and the database layer.
  • The consolidation of features also better supports continuous integration, a practice of frequently testing the software being developed, through the use of tools such as Jenkins, to which UFT can be connected.
  • UFT 11.5 also includes a new patented recognition technology that can scan applications and document how they operate.

Source: http://www.computerworld.com/s/article/9233308/HP_simplifies_automated_software_testing_suite?taxonomyId=18

Friday

dynaTrace Ajax + QTP/Selenium = More than automation




Ever wondered apart from the plain raw automated scripts what MORE could we achieve which will help the business achieve MORE with the same cost.
Performance is what we are looking for with the same old GUI automation!

  • GUI Automation + Performance = Value Added Automation
  • GUI Automation + Performance =
    • Selenium + dynaTrace Ajax
    • QTP + dynaTrace Ajax
    • Any automation tool + dynaTrace Ajax
      • Request Start Time Business Event Time
      • DNS/Network Time
      • OnLoad Time Latency
      • Rendering Time
      • JS Execution Time
      • Resource Download Time
Problem areas when it comes to testing web 2.0 applications:
  1. JavaScript
  2. XmlHttpRequests
  3. DOM Manipulations
  4. Frameworks
  5. Layouting
  6. Rendering.
dynaTrace AJAX Edition has been built to address all these issues to help understand what is causing performance- and functional-related problems in modern AJAX Applications.



Here is a Step-by-Step Guide to dynaTrace Ajax Edition:
http://blog.dynatrace.com/2009/11/17/a-step-by-step-guide-to-dynatrace-ajax-edition-available-today-for-public-download/
 

Thursday

Skillset for a Selenium Automation tester




As always here is another interesting job requirement and we can map our skillset to this posting for a "Selenium Automation tester"

A very challenging automated testing position has emerged for one of the most exciting companies based in the city of London. My Client a Global Hedgefund company, incubating start up greenfield projects, they are in the market for a technical, innovative and passionate Automated Tester. This brilliant opportunity is open to an experienced Automated tester with a strong programming knowledge, ideally in C# or any object orientated language. The successful Automate tester will be designing, implementing, and executing manual and automated tests and must have experience using Selenium to build their own test frameworks in C#. The successful Automated tester will be part of a test team set revolutionise the financial industry with state of the art technology..

The successful QA Test Analyst will also have the following skill set:

- A background in development, ideally C# or ASP.Net

- Solid experience of building their own test automation frameworks from scratch

- Experience in API testing and Proficient in using tools such as JUnit, NUnit, Nhibernate

- Performance/Load testing of websites and webservices

- Experience of a complete software development life cycle

- Building Test Harnesses

- Agile / Scrum / TDD / BDD

- Scripting skills in one of the following - TCL, Perl, Python, HTML, Shell, Unix

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


Tuesday

Automation testing in a changing environment (Requirements) ?




With the requirements changing at a rapid pace what are the best possible solutions to how you perceive testing or automation:

  1. Use of Rapid prototyping
  2. Prioritize and analyze the risks
  3. There has to be a requirements traceabilty of some kind that will showcase affected areas
  4. Automate the smoke test bed - break it down into small business components
  5. Automate smaller Happy paths that do the basic sanity check on functionalities
  6. Use automated TDD or BDD as early as possible
  7. Use a set of tools that help you automate or do smaller tasks faster and more accurate
  8. Static object identification till a certain path and from there on we try finding other objects, this makes the code reusable and a lot more easy to change
A very nice quote which says - "Any tool you use to help you test is "automation" and the more complex scripting environments are simply extensions of that capability"

Another newbie to automation - SIKULI



  • Sikuli Script automates anything you see on the screen using image recognition
  • It is useful when there is no easy access to a GUI's internal or source code
  • Sikuli is an open-source research project originally started at the User Interface Design Group at MIT
  • Sikuli Script is a visual scripting API using Jython to create automation scripts.
  • Sikuli includes an integrated development environment (IDE) for writing visual Sikuli scripts with screenshots.
  • Sikuli Script uses Python as the scripting language. If you want to write complex scripts or modularize packages, you need basic knowledge of Python and its features
Sample script:























Source: http://www.sikuli.org/

Is there one tool to test everything?

Friday

Skillset - Technical Test Analyst x 3 - TDD, Agile, Scrum, Test Automation, Frameworks



Technical Test Analyst x 3 - was a very interesting job posting that a banking firm wanted in UK. Here the three represented three analysts they were looking for but I assumed that three was the "three big skills" they were looking for: TDD, Agile/Scrum and Test Automation Frameworks

Note the Skillset category is just to gauge where you stand in terms of the skills required for the role
  1. Technical Test Analysts are required for an Investment Banking / Trading software giant in London.
  2. This is a fantastic and exciting time to join such a business that offers Technical Test Analysts the opportunity to work on a wide range of projects from bespoke trading system solutions through to trade capture tools, pricing & risk engines to retail banking platforms.
  3. All projects are extremely complex and require the most dynamic, forward thinking and technically astute testers to fulfil the positions.
  4. The Technical Test Analysts must have API, Web, Server-side, TDD, BDD, UI, Automation, Functional and Non-Functional Testing experience.
  5. The successful Testers will ideally have a background in atleast one OO programming language for automation testing.
  6. These languages will include either C#, Java or PHP.
  7. The Technical Test Analysts will be able to utilise these languages to develop test automation frameworks from scratch in tools such as Selenium (RC or WebDriver), QTP, Nunit, Junit, Jmeter and/or LoadRunner.
  8. The Technical Test Analysts must have a solid foundation the Agile / Scrum methodology.

Thursday

QTP Test Automation Framework Architecture

Here is a mindmap that I had created some time back on a hybrid test automation framework, this gives a nice idea of the functionalities a framework might want to incorporate.

Tuesday

Launch Report Button Missing in QC Test Lab



There are a lot of instances when we want to launch the summary report from the Test Instance Properties window in test lab, but the Launch report button is not present. This happens after new patches get installed.

Resolution : Install the correct version of
 
  • Reinstall Visual C++ 2005 (version 8.0.56336) or SP1
  • Reinstall .NetFramework 3.5 SP1
  • Reinstall all Add-Ins currently installed on the Client machine

With windows 7 and QC\QTP 11.

1) uninstall qtp addin

2) Install the vsc++

http://www.microsoft.com/download/en/details.aspx?id=14431

download and run vcredit_x64.exe

3) install qtp addin



Monday

QTP 11 and QTP 12 what's new ?

 

 QTP11


Please note the below support deadlines for QTP11 and Quality center11.

You can find more details on below link,

http://support.openview.hp.com/encore/products.jsp

HP Software Released Notification Support ends


QTP 12


Below is the list of new features will be released with QTP12.

a) New improved IDE with IntelliSense technology for classes.

b) Multiple Document Interface (MDI) features for opening multiple tests within QTP.

c) Integration of BPT as well as Service Test into QTP (giving rise to the name, UFT).

d) Insight — an innovative, new image-recognition feature for carrying out image-based automation.

e) New canvas for designing test flow.


The main highlight is that use of ‘Intellisense’ will reduce the reference of external documentation while development which will speed up test development. An ‘Intellisense’ combination with QTP will help to select the parameters and functions from the list or from the dropdown of that specific code.

Wednesday

Funny QA Jargons


Smug Report
A bug submitted by a user who thinks he knows a lot more about the system's design than he really does. Filled with irrelevant technical details and one or more suggestions (always wrong) about what he thinks is causing the problem and how we should fix it.

Also related to Drug Report (a report so utterly incomprehensible that whoever submitted it must have been smoking crack.), Chug Report (where the submitter is thought to have had one too many), and Shrug Report (a bug report with no error message or repro steps and only a vague description of the problem. Usually contains the phrase "doesn't work.")

A Duck
A feature added for no other reason than to draw management attention and be removed, thus avoiding unnecessary changes in other aspects of the product.

I don't know if I actually invented this term or not, but I am certainly not the originator of the story that spawned it.
This started as a piece of Interplay corporate lore. It was well known that producers (a game industry position, roughly equivalent to PMs) had to make a change to everything that was done. The assumption was that subconsciously they felt that if they didn't, they weren't adding value.

The artist working on the queen animations for Battle Chess was aware of this tendency, and came up with an innovative solution. He did the animations for the queen the way that he felt would be best, with one addition: he gave the queen a pet duck. He animated this duck through all of the queen's animations, had it flapping around the corners. He also took great care to make sure that it never overlapped the "actual" animation.
Eventually, it came time for the producer to review the animation set for the queen. The producer sat down and watched all of the animations. When they were done, he turned to the artist and said, "that looks great. Just one thing - get rid of the duck."

Refuctoring
The process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone except yourself.

Baklava Code
Code with too many layers.
 
Baklava is a delicious pastry made with many paper-thin layers of phyllo dough. While thin layers are fine for a pastry, thin software layers don’t add much value, especially when you have many such layers piled on each other. Each layer has to be pushed onto your mental stack as you dive into the code. Furthermore, the layers of phyllo dough are permeable, allowing the honey to soak through. But software abstractions are best when they don’t leak. When you pile layer on top of layer in software, the layers are bound to leak.

Ninja Comments
Also known as invisible comments, secret comments, or no comments.

Mad Girlfriend Bug
When you see something strange happening, but the software is telling you everything is fine.

For more fun jargons -
Source: http://www.codinghorror.com/blog/2012/07/new-programming-jargon.html

Monday

TOSCA - Newbie for me



Was exploring the web when I stumbled upon TOSCA and found that this is an interesting new tool thats picking up in the automation world slowly:
TOSCA Testsuite is a software tool for the automated execution of functional and regression software testing

  • TOSCA includes integrated test management, a graphical user interface (GUI), a command line interface (CLI) and an application programming interface (API)
  • They claim - TOSCA model-based approach marks a paradigm shift in software test automation

TOSCA Capabilities:

Agile Testing
Big Data Testing for Data Warehouses and BI
ALM Integration with Popular Systems such as HP, IBM, JIRA defect tracking and many others
GUI
Non-GUI Testing
Manual
Regression Testing
Mobile/Smart Device Testing
Model-Based Testing
SAP Testing
Standard & Custom Reporting
Test Data
X-Browser Testing

You might want to look at thier website for a demo or trial version:
http://www.tricentis.com/en/tosca

Saturday

Important reusable functions QTP



Its been a long time that I had been collecting reusable code for QTP.
Though the doc is not exhaustive it has loads of important and reusable functions that will help anyone using QTP

Follow the link and download!

Reusable functions

And if you like the doc hit like on my book's facebook page
http://www.facebook.com/pages/Technology-Specific-Guide-for-QTP/190184084424725

Happy testing...


Friday

Testing Best quotes ever !





I am sure most of us would have heard and used testing quotes in our signatures, here are a few that i randomly picked :


"I don't break anything, they're already broken"

Testing, turning Stressed into Impressed since 1971

I came, I saw, I broke it

I'm OK, you're OK. Your code I'm not so sure about

To err is human; to find the errors requires a tester

'Tried, trialled and tested'

Testing, because your software is worth it!

If your software works, thank a tester

Have you hugged your software tester today?

I Failed My Way To Success

The customer is always right. Testing make sure they are always alright

'A Tester Is Someone Who After Finding a bug after 5 minutes brags about how he is responsible for the success of the project'

 we're tough on the code but soft on the coders

Those are the bugs, if you don't like them...I have others.

Improving the world one bug at a time

In God we trust, rest we test!


The best one - "Does your mother know what kind of code you write?"



Tuesday

Testing Services - A Holistic view



Here are the most commonly seen testing services provided by organizations. This will help a tester gauge his capabilities and awareness:



P.S: Click on the image for a larger view.

Ten Best Tools for Test Automation revisited



Here are the ten best automation tools wrt functional automation and their usage in the market:

Apart from these ten you can also look at an exhaustive list from an earlier post here

1 HP QuickTest Professional(QTP)

2.Selenium

3.Rational robot

4. IBM Rational Functional Tester(RFT)

5.SilkTest

6.eggPlant

7.SOAtest

8.TestComplete

9.Testing Anywhere

10.Visual Studio Test Professional Microsoft 2010


Feel free to comment on any changes to this list!
I am a big fan of open source so I am sure there are a lot that I am missing here and can be found in my earlier post


Happy Testing!

Saturday

Skillset - Software Engineer in Test Automation




Here is an pretty good role description for an SDET role with not much experience :

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



You're a developer who likes to break things. You strive for quality and are focused on improving issues around performance, stress, security, reliability, and user experience.


The work:

•Work with development and program management teams to design and test new features.

Develop tools & automation.

Enhance the overall test infrastructure.

•Write test plans & test cases.

•Perform ad-hoc, manual, automated testing.

•File bug reports


Experience and skills needed:

•BS in Computer Science or a related field of study.

•2+ years of experience with C++, Java, Perl, XML/HTML, and related technologies.

•Familiar with UNIX.

•Proven ability to learn quickly.

•Excellent written and verbal communication skills.

•Excellent troubleshooting and problem solving skills.

•Ability to work in a fast-paced environment with aggressive release schedules.

•Experience in API testing methodologies and automation test development is a plus.

•Experience in testing embedded devices is another plus.

•Knowledge of stress, performance and capacity planning is also a plus

Wednesday

Another reason why testing is so important!



The technical errors that have recently befallen Knight Capital, BATS and Nasdaq causing chaos to the markets are not the result of complexity or fragmented markets, but the result of basic technology 101 issues, SEC chairperson Mary Schapiro said today during the agency’s market technology roundtable.


During the SEC discussion, Dr Nancy Leveson, professor of aeronautics and astronautics and engineering systems, MIT, argued that software errors will always happen. The financial industry, like the aviation industry, needs solutions beyond technology – which must include strong regulation.

“ Most industries have government agencies overseeing with an iron hand. The aircraft industry knows people will stop flying if planes start falling out of the sky. You cannot build an unsinkable ship or unfailable software. If you engage in hubris and wishful thinking, you will have to suffer the consequences,” Leveson said.

Still, GETCO CTO Jonathan Ross argued that in order to avoid technical glitches, firms must follow several testing best practices: These include having independently designed systems, he said.

“ To the extent possible, systems should be independent from other systems to limit the potential for an error or failure to cascade to other systems,” he said, adding that any changes to systems must be small, incremental and frequent to reduce the magnitude of any errors and make it easier to mitigate the impact of such errors if they do occur.
Ross also suggested using layered, redundant risk measures, with multiple, overlapping levels of preventive or protective risk controls that each look at a system independently.

GETCO has a formal process for testing its software, Ross noted. This includes a testing lab, testing protocols that developers follow, and change management processes, he wrote in a statement for the SEC.

“Development and testing should reinforce each other; continuous building and testing gives developers a strong feedback loop,” he said.

In the development cycle, common approaches to software testing firms should follow include unit testing – or tests of discrete, generally small, specific and functional, components of the system.

Best practices should also include regression testing, or tests built specifically to address a bug previously identified and to prevent the reintroduction of that bug and integration testing, or system tests designed to test the interaction of applications with each other or outside parties.

Source: http://www.wallstreetandtech.com/technology-risk-management/how-to-test-your-software-to-avoid-techn/240008293

Selenium IDE + Datadriven + Agile



Selenium IDE though is not a good option for full fledged test automation , yet this tool proves good when it comes to automation within agile sprints

This post explains how to use selenium IDE with test data for data driven testing:

  1. Save the first extension : flowcontrol extension for IDE
  2. Download the extension 1.1 version of the includeCommand4IDE
  3. Download the  most recent version of the datadriven.js extension
  4. Add all the three extensions using Selenium Core extensions field from Options ->Options->General) in the same order.
  5. Restart firefox so that the extensions get installed and are ready to be used.
  6. Create your test data in xml format

The above sample data has three rows of test data with var1 and var2 as the two variables, make sure you open the xml in a browser to see that there are no errors 
You are ready to use the test data and a simple test case would look like this:

loadTestData   file:///C:\testdata.xml
open                  http://google.com
while                 !testdata.EOF()
nextTestData
verifyTitle         ${title}
goBackAndWait
endWhile

Happy Testing with Selenium IDE

    Skillset - Automation Test Engineer (with Selenium + Java / PHP)




    Continuing the series of posts under the skillset category, here is another very interesting job profile f
    or a Test Automation Architect:


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

    •Robust and rigorous approach to browser-based testing, bordering on a fanatical eye for detail

    •Ability to work under your own initiative and provide proactive feedback to the development team and managers

    •Expert in automation of website testing scripts (Selenium Webdriver / RC), and writing bespoke test scripts in languages supported by Selenium (Java / PHP etc.) across multi-browser testing environment

    •Logical approach using and managing manual tests where appropriate

    •Business fluent English with excellent spelling and grammar

    •Ability to work as part of a very close-knit development team as the owner of system testing and sign-off

    •2+ years commercial experience post technical degree

    •Familiarity with good 'User experience' designs would be beneficial



    Monday

    September 9th was World Tester's Day!

    September 9 was World Tester's Day !


    I had never heard of tester's day before, here is what a quick search brings up:



    On September, 9 1945 the scientists of the Harvard University while testing the computer Mark II Aiken Relay Calculator have found a moth which has got stuck between the contacts of the electromechanical relay.

    The work they performed required some description, and the word has been found – «debugging» (literally: disposal of an insect) – and nowadays it is used to describe the process of identifying and eliminating bugs which cause a computer to malfunction. The removed insect was pasted into the computer log with the entry: “First actual case of bug being found”, and was then transferred to the computer museum.

    Happy Testing and Belated wishes!

    Wednesday

    Seven Pragmatic Practices to Improve Software Quality - A Forrester research report

    A new Forrester Research report, Seven Pragmatic Practices to Improve Software Quality, by analysts Margo Visitacion and Mike Gualtieri.

    Seven steps taken directly from the Forrester report:


    Pragmatic Practice 1 Define Quality to Match Your Needs

    Impact on Quality: Meet business requirements; achieve a satisfying user experience.

    Benefit: Your ability to achieve quality is improved because the application development team is not charged with unrealistically perfect expectations. Rather, it is chartered with a definition of quality that fits the given time, resource, and budget constraints.

    Relevant Roles: Business stakeholders; entire application development team.

    Pragmatic Practice 2 Broadcast Simple Quality Metrics

    Impact on Quality: Reduce defects.

    Benefit: Highly visible metrics keep quality top of mind for the entire team and expose when efforts fall short.

    Relevant Roles: Entire application development team.

    Pragmatic Practice 3 Fine-Tune Team/Individual Goals to Include Quality

    Impact on Quality: Meet business requirements; achieve a satisfying user experience; reduce defects.

    Benefit: Team members perform according to their incentives, making quality improvement part of their goals reinforces desirable behavior.

    Relevant Roles: Management.

    Pragmatic Practice 4 Get the Requirements Right

    Impact on Quality: Meet business requirements; achieve a satisfying user experience.

    Benefit: Less rework means less retesting and fewer cycles, which greatly reduces the overall effort.

    Relevant Roles: Managers, business analysts, user experience designers, architects.

    Pragmatic Practice 5 Test Smarter to Test Less

    Impact on Quality: Reduce defects.

    Benefit: A focus on testing the most crucial and at risk areas ensures that they receive the lion's share of test resources and that any bugs that slip through are likely to be confined to the least-important features.

    Relevant Roles: Quality assurance, managers.

    Pragmatic Practice 6 Design Applications to Lessen Bug Risk

    Impact on Quality: Reduce defects.

    Benefit: Simpler, cleaner designs result in code that is simpler, cleaner, and easier to test and rework—which means that the code will have fewer bugs and that those bugs will be easier to diagnose and repair.

    Relevant Roles: Architects, developers.

    Pragmatic Practice 7 Optimize the Use of Testing Tools

    Impact on Quality: Reduce defects.

    Benefit: Automation frees resources from mundane testing to focus on the highest-priority tests and increases test cycles' repeatability.

    Relevant Roles: Quality assurance, developers.

    Visitacion and Gualtieri conclude that software quality is a team sport, and everyone needs to play.

    Thursday

    Another reason why testing is so important!




    Bad Algorithm Burns $440 Million -  Worst Software Testing Day EVER

    Knight Capital, a firm that specializes in executing trades for retail brokers, took $440 million in cash losses Wednesday due to a faulty test of new trading software.

    In headlines it’s being called a trading “glitch,” which isn’t nearly as accurate as the term I’d use: “f**king disaster.” The broad outline of the story is here and more colorful, bloody details are here.


    Briefly, here’s what happened: Knight Capital’s worst day in IT started Wednesday morning with a test run of their new trading software. An old pal of mine who’s following the story closely (and is also deep in both IT and trading) told me that the company set up the software to work with only a few stocks. They also set the buy/sell points well outside where the markets were currently trading to ensure that nothing would actually execute.

    But somehow – and this will probably the be the subject of several lawsuits, books, and maybe even a Broadway musical – the software didn’t behave as expected. It went out and did what it was designed to do: execute lots and lots of trades very, very quickly.

    Unfortunately, the trading algorithm the program was using was a bit eccentric as well. On every stock exchange, there is a ‘bid’ and an ‘ask’ price. The bid price is what you’d pay the holder of the stock if you want to buy their shares. The ask price is what they’ll pay to buy those same shares from you. There’s always a spread between the two prices, with the ‘bid’ being a few cents or more above the ‘ask.’ If the stock is thinly traded, then the spread between the bid and the ask is higher than what you’d see for, say, IBM.

    Knight Capital’s software went out and bought at the ‘market,’ meaning it paid bid price and then sold at the ask price – instantly. Over and over and over again. One of the stocks the program was trading, electric utility Exelon, had a bid/ask spread of 15 cents. Knight Capital was trading blocks of Exelon common stock at a rate as high as 40 trades per second – and taking a 15 cent per share loss on each round-trip transaction. As one observer put it, “…Do that 40 times a second, 2,400 times a minute, and you now have a system that’s very efficient at burning money.”

    As the program continued its ill-fated test run, Knight’s fast buys and sells moved prices up and attracted more action from other trading programs. This only increased the amount of losses resulting from their trades to the point where, at the end of the debacle 45 minutes later, Knight Capital had lost $440 million and was teetering on the brink of insolvency.

    They may get at least a partial reprieve. The NYSE will reverse trades in six stocks during the time period when the prices were at least 30% outside the normal trading range for the stocks. This will significantly defray much of Knight Capital’s losses for the day, but we don’t know if it’s enough to allow the firm to survive the blow.

    We also don’t yet know exactly what happened. I find it hard to believe that the software was so faulty that it could just go into berserker mode and start wildly trading. Seems to me that that’s the type of issue that ISV regression testing would find and correct right away. On the other hand, I don’t think that the Knight Capital IT guys would just fire the program up for testing and not put in solid parameters to ensure that it doesn’t play with real money.

    I think we’ll find that the culprit was a combination of ISV software bugs, bad documentation, and human error from Knight Capital. In short, plenty of blame to go around. But apportioning blame will have to wait until the forensics are complete. Then will come the lawsuits, settlements, high-level blue-ribbon commission hearings, and, finally, the insider tell-all books. Put me down for a Kindle versions of the books, please.

    Source: http://www.gabrielconsultinggroup.com/gcg-news-and-views/20-general-blog/434-bad-algorithm-burns-440-million-worst-software-testing-day-ever.html

    Useful Code snipptes - VBScript


    VBScript data structures

    Vbscript lacks support of complex data structures unlike other programming languages. This sometimes make life a bit difficult. We need to code our own algorithms to achieve simple tasks like sorting of an array or reversing it. .net has support for complex data structures which come with build-in functions for these simple tasks. So if we can use .net data structure then we can save reinvention of wheel for some of these tasks. Well the good news is some of .net libraries are exposed to COM and can be used in vbscript.

    Below are some examples:

    ArrayList:


    Set objArrayList = CreateObject("System.Collections.ArrayList")

    objArrayList.Add 6
    objArrayList.Add 8
    objArrayList.Add 2
    objArrayList.Add 4
    objArrayList.Add 1
    objArrayList.Add 5
    objArrayList.Add 3
    objArrayList.Add 3
    objArrayList.Add 7

    'unlike redefining array size (redim statement) every time before appending an element into an array,
    ' with arraylist you don’t need to worry about that.

    'Converting ArrayList to legacy Array
    Debug.Print Join(objArrayList.ToArray, ",") ' output: 6,8,2,4,1,5,3,3,7

    'will give u element at mentioned index
    Debug.Print objArrayList(0) ' output: 6

    'this will give u size of arraylist
    Debug.Print objArrayList.Count ' output: 9

    'this will tell u if an element exists or not. no need to iterate over all elements
    Debug.Print objArrayList.contains(5) ' output: true

    'this will sort elements. no need to write long algorithms
    objArrayList.Sort


    Debug.Print Join(objArrayList.ToArray, ",") ' output: 1,2,3,3,4,5,6,7,8

    'this will reverse the order of all elements present
    objArrayList.Reverse


    Debug.Print Join(objArrayList.ToArray, ",") ' output: 8,7,6,5,4,3,3,2,1

    'remove a specific element
    objArrayList.Remove 8 'This will remove 8 from arraylist no matter on which index it is on

    'remove element by index
    objArrayList.RemoveAt 6 'This will remove element present at 6th index

    'remove all elements
    objArrayList.Clear

    For VBScript Dictionary Objects we don’t need to redim while appending/removing elements; also an element can be directly searched without iterating through each of them. Both of these features are available with ArrayList as well but one of the most important dictionary object feature ‘Key-Value pair’ is not present in ArrayList. SortedList is alternative if you want utilize power of both ArrayList and Dictionary.

    SortedList :
    SortedList is sorted Dictionary. Every time we add/remove a key value pair in dictionary, it automatically gets sorted by Key. Also you can also access elements based on its index (just like arrays) which makes this even more powerful.

    'For this example I am maintain employee name and joining date where joining date is the key

    Set objSortedList = CreateObject("System.Collections.SortedList")
    objSortedList.Add CDate("1-jan-2012"), "Ajay"
    objSortedList.Add CDate("3-Mar-2012"), "Amit"
    objSortedList.Add CDate("20-dec-2011"), "Jay"
    objSortedList.Add CDate("2-jan-2012"), "Vijay"
    ' All elements will be automatically sorted by Key (joining date in this case)
    'Get Count of elements
    Debug.Print objSortedList.Count 'output : 4
    'access element by its key
    Debug.Print objSortedList(CDate("1-Jan-2012")) 'output: Ajay
    'accessing elements of dictionary by index
    For i = 0 To objSortedList.Count - 1
        Debug.Print objSortedList.GetByIndex(i)
    Next

    'Check if Keys Exists
    Debug.Print objSortedList.ContainsKey(CDate("1-jan-2012")) 'output: True

    'Check if Value Exists
    Debug.Print objSortedList.ContainsValue("Vijay") 'output: True


    'Get Index by Key (zero based index)
    Debug.Print objSortedList.IndexOfKey(CDate("1-jan-2012")) 'output: 1


    'Get Index By Value
    Debug.Print objSortedList.IndexOfValue("Vijay") 'output: 2


    'Remove Element by Key
    objSortedList.Remove CDate("1-jan-2012")


    'Remove Element by Index
    objSortedList.RemoveAt 0

    'Remove all elements
    objSortedList.Clear


    Using Stack:


    Set objStack = CreateObject("System.Collections.Stack")
    'Adding elements in Stack
    objStack.Push "Item_1"
    objStack.Push "Item_2"
    objStack.Push "Item_3"
    objStack.Push "Item_4"

    'Iterate through each element of Stack
    For Each Item In objStack
       Debug.Print Item
    Next


    'Convert Stack to Array
    Debug.Print Join(objStack.ToArray, ",") 'output: Item_4,Item_3,Item_2,Item_1

    'Get Stack Element Count
    Debug.Print objStack.Count 'output: 4


    'Check if an element exists or not
    Debug.Print objStack.Contains("Item_2") 'output: True


    'Pop the last In element from Stack
    Debug.Print objStack.Pop 'output: Item_4

    'Get Last in element without popping it out
    Debug.Print objStack.Peek 'output: Item_3
    Debug.Print objStack.Pop 'output: Item_3
    Debug.Print objStack.Pop 'output: Item_2

    ‘Remove all elements from Stack
    objStack.Clear

    Using Queue:


    Set objQueue = CreateObject("System.Collections.Queue")
    'Adding elements in Queue
    objQueue.Enqueue "Work_Request_ID_11"
    objQueue.Enqueue "Work_Request_ID_2"
    objQueue.Enqueue "Work_Request_ID_4"
    objQueue.Enqueue "Work_Request_ID_9"

    'Iterate through each element of Queue
    For Each Item In objQueue
      Debug.Print Item
    Next


    'Convert Queue to Array
    Debug.Print Join(objQueue.ToArray, ",") 'output: Work_Request_ID_11,Work_Request_ID_2,Work_Request_ID_4,Work_Request_ID_9

    'Get Queue Element Count
    Debug.Print objQueue.Count 'output: 4

    'Check if an element exists or not
    Debug.Print objQueue.Contains("Work_Request_4") 'output: True

    'Get the First In element from Queue
    Debug.Print objQueue.Dequeue 'output: Work_Request_ID_11


    'Get first in element without removing it
    Debug.Print objQueue.Peek 'output: Work_Request_ID_2
    Debug.Print objQueue.Dequeue 'output: Work_Request_ID_2
    Debug.Print objQueue.Dequeue 'output: Work_Request_ID_4

    'Clear Entire Queue
    objQueue.Clear

    Disconnected RecordSets:
    Multi-Level Sorting and Filtering: If you are dealing with data which requires more than just key value pair and fits best in 2D array, and you wanted to perform sorting and filtering on it, then disconnected recordsets will be excellent option.
    (Although this is not related to .net but is quite useful in these situations)

    Let’s say if I have below 2D array
    EmpID EmpName EmpAge JoiningDate
    1 Ajay 27 5-Jan-2012
    2 Vijay 28 5-Jan-2012
    3 Jay 30 2-Mar-2012
    4 Amit 26 20-Dec-2011
    And you wanted to get employees who joined in 2012 and are have age less than 30, also you wanted to get data sorted on joining Date and if joining date is same then second level of sorting should be applied at Age (in descending order).

    Output should look like
    EmpID EmpName EmpAge JoiningDate
    2 Vijay 28 5-Jan-2012
    1 Ajay 27 5-Jan-2012

    Building this logic in plain Vbscript might be tedious and error prone, instead we can use a disconnected recordset to first populate data and then filter, sort elements by using its internal function.

    Const adDouble = 5
    Const adVarChar = 200
    Const adDate = 133

    Set objRecordSet = CreateObject("ADODB.Recordset")
    objRecordSet.Fields.Append "EmpID", adDouble
    objRecordSet.Fields.Append "EmpName", adVarChar, 50
    objRecordSet.Fields.Append "EmpAge", adDouble
    objRecordSet.Fields.Append "JoiningDate", adDate
    objRecordSet.Open
    objRecordSet.AddNew Array("EmpID", "EmpName", "EmpAge", "JoiningDate"), Array(1, "Ajay", 27, CDate("5-Jan-2012"))
    objRecordSet.AddNew Array("EmpID", "EmpName", "EmpAge", "JoiningDate"), Array(2, "Vijay", 28, CDate("5-Jan-2012"))


    objRecordSet.AddNew Array("EmpID", "EmpName", "EmpAge", "JoiningDate"), Array(3, "jay", 30, CDate("2-Mar-2012"))
    objRecordSet.AddNew Array("EmpID", "EmpName", "EmpAge", "JoiningDate"), Array(4, "Amit", 28, CDate("20-Dec-2011"))
    objRecordSet.Filter = "JoiningDate>'1-jan-2012' and EmpAge<30"
    objRecordSet.Sort = "JoiningDate, EmpAge DESC"
    objRecordSet.MoveFirst
    Do Until objRecordSet.EOF
        Debug.Print objRecordSet("EmpID").Value & "
        " & objRecordSet("EmpName").Value & "
        " & objRecordSet("EmpAge").Value
        objRecordSet.MoveNext
    Loop
    objRecordSet.Close

    Tuesday

    Free QTP book - "Technology Specific Guide for QTP"



    After loads of comments and feedback filling our inbox , we decided to giveaway three copies of the book - "Technology Specific Guide for QTP" for free.


    No need of hunting for free QTP ebooks or QTP tutorials or QTP interview questions or QTP certification !

    So how do you get a free copy?

    Click Here to know more..

    Friday

    Query to extract all test steps of a test set in QC dashboard




    SELECT CYCLE.CY_CYCLE AS TEST_SET,


    TEST.TS_NAME AS TEST_NAME,

    TEST.TS_TYPE AS TEST_TYPE,

    DESSTEPS.DS_STEP_NAME AS STEP_NAME,

    DESSTEPS.DS_DESCRIPTION AS STEP_DESCRIPTION,

    DESSTEPS.DS_EXPECTED AS STEP_EXPECTED_RESULT



    FROM TESTCYCL, TEST, CYCLE, DESSTEPS

    WHERE TEST.TS_TEST_ID = TESTCYCL.TC_TEST_ID AND

    TESTCYCL.TC_CYCLE_ID = CYCLE.CY_CYCLE_ID AND

    TEST.TS_TEST_ID = DESSTEPS.DS_TEST_ID AND

    CYCLE.CY_CYCLE = 'Test Set name'

    ORDER BY CYCLE.CY_CYCLE,TEST.TS_NAME,DESSTEPS.DS_STEP_NAME

    Monday

    Frequently Asked Questions QTP Book - Technology Specific Guide for QTP


    Frequently Asked Questions:

    Can I buy this TSG-QTP(Technology Specific Guide for QTP) in India?
    Yes. The book is available only in India, we are working at options for other countries. Please order the books online by clicking here
    Where can i Buy this book(TSG-QTP)?
    There are different buying options for this book. Click here to see possible buying options
    Is the book available in any book store?
    No, Currently the book is only available online
    I am ordering book in bulk quantity, can i get discount on the same?
    If you are ordering more than 5 copies, you can contact us for discounts.
    How can i provide feedback for this book?
    You can always provide your feedback by contacting us

    Tuesday

    Here is what the experts had to say - TSG-QTP ( QTP book )

    After a long struggle to get the copyright from HP , the ISBN number from Delhi, prominent QTP experts to review and finally a publisher , I am happy to let you know that my book is out and quite a few copies are sold. Below is a snapshot of the mail I send to prospective testers, would be great if you could forward the same to people you know. Thanks in advance.


    Okay, so all of you who said you'd wait for the paperback of my new book “Technology Specific guide for QTP”, now comes the time. Please visit the website to read the reviews and newsletter.

    This book will get you started on the path of automation, introducing solutions, roadblocks, patches and ideas that will help give you a solid foundation in the field of automation. Each problem has a series of solutions available that will let you test your knowledge and apply it to the business situations you’re facing at your company. Everyone from a novice user to an automation expert will have something they would have never heard of or used.

    Here is what the experts had to say :




    A no-nonsense, well-written and well- organized book on QTP and targeted technologies. A must read book for QTP users.

    - Sivasankar Jayagopal
    Senior QA Manager, Adobe Systems.


    A one of its kind when it comes to looking at different technologies that the tool supports. It uses a careful, example-based, easy to understand approach.

    - Shalaka Dani
    Program Director, MindTree Limited.

    http://bluemagic-automation.blogspot.in/

    Thursday

    Technology Specific Guide for QTP - ( QTP book )



    We have received a lot of queries regarding the book, the book has been off the shelves and out of stock on flipkart and other websites. The best way to get the book Technology Specific Guide for QTP – QTP for Web Testing - now is directly through us:


    Mail us at :
    aditya_kalra@ymail.com
    timothyrajan@gmail.com

     


    Have you ever wondered?
    • How do I evaluate my skill-set in automation?
  1. What do I do to become an expert in a test automation tool like QTP?
  2. What do I do every time I hit a roadblock while automating a new solution?
  3. What are the latest out of the box features HP has to offer?

  4. Then grab a copy of “Technology Specific Guide for QTP – QTP for Web Testing” today.!

    http://bluemagic-automation.blogspot.in/

    What’s In It for You?

    Everyone from a novice user to an automation expert will have something they would have never heard of or used. Our motivation for writing the book was noticing that a lot of people have found themselves in an automation architect role with little or no technology background at all. We come from either QTP/Selenium/Other tools working on different technologies or fresh out of college and are expected to be full-fledged automation experts, expected to be able to generate impressive results by managers who don’t fully understand automation and technology challenges themselves. Therefore we were adamant that we didn’t want to write just another book on the basics of QTP. The result? TSG-QTP (Technology Specific Guide for QTP) - in plain English - the experiences we encounter in our day to day automation core activities.


    This book gets you started on the path of automation, introducing solutions, roadblocks, patches and ideas that will give you a solid foundation in the field of automation.


    Each problem has a series of solutions available that will let you test your knowledge and apply it to the business situations you’re facing at your company.

    Please feel free to reach out to us at:


    Technology Specific Guide for QTP

    Aditya Kalra
    +91-9886928349

    Monday

    Another reason why testing is so important!




    Yet again we see a real life scenario showing what bad testing scenarios can do:

    Nasdaq CEO Blames Software Design for Delayed Facebook Trading

    • May 21 (Bloomberg) -- Nasdaq OMX Group Inc., under scrutiny after shares of Facebook Inc. were plagued by delays and mishandled orders on its first day of trading, blamed "poor design" in the software it uses for driving auctions in initial public offerings.
    • "biggest IPO cross in the history of mankind" was occurring
    • Nasdaq's systems fell into a "loop" that prevented the second-largest U.S. stock venue operator from opening the shares on schedule following the $16 billion deal
    • Nasdaq will use an "accommodation pool" to pay back investors that should have received executions in the opening auction, based on the decisions of a third-party reviewer, Greifeld said. It may total $13 million, he said.
    • The IPO software "didn't work" even after thousands of hours of testing for "a hundred scenarios" aimed at anticipating problems
    • Volume during the auction amounted to 75.7 million shares, or almost 1 percent of trading during the entire day on all U.S. exchanges, according to data compiled by Bloomberg
    Source: News

    Automate recurring appointments on MS Outlook



    Here is another piece of code that is fun when it comes to automating data from excel and setting up outlook recurring appointments.

    strExcelPath = ""


    Const olAppointmentItem = 1
    Const olRecursWeekly = 1

    Set objExcel = CreateObject("Excel.Application")
    objExcel.WorkBooks.Open strExcelPath
    Set objSheet = objExcel.ActiveWorkbook.Worksheets(1)

    intRow = 3
    Do While objSheet.Cells(intRow, 1).Value <> ""
        strName = objSheet.Cells(intRow, 3).Value
        strDate = objSheet.Cells(intRow, 4).Value
       
        Set objOutlook = CreateObject("Outlook.Application")
        Set objAppointment = objOutlook.CreateItem(olAppointmentItem)

        strStart = strDate & "/2012 11:00 AM"
        strEnd = strDate & "/2099 11:00 AM"
        objAppointment.Start = strStart
        objAppointment.Duration = 30
        objAppointment.Subject = strName & " Birthday Reminder"
        objAppointment.Body = "Today is " &strName& "'s Birthday!"
        objAppointment.Location = "Team Decides"
        objAppointment.ReminderMinutesBeforeStart = 15
        objAppointment.ReminderSet = True

        Set objRecurrence = objAppointment.GetRecurrencePattern
        objRecurrence.RecurrenceType = 5
        objRecurrence.PatternStartDate = strStart
        objRecurrence.PatternEndDate = strEnd

        objAppointment.Save
       
        Set objRecurrence = nothing
        Set objAppointment = nothing
        Set objOutlook = nothing
     
        intRow = intRow + 1
    Loop

    ' Close workbook and quit Excel.
    objExcel.ActiveWorkbook.Close
    objExcel.Application.Quit
    set objSheet = nothing
    set objExcel = nothing

    Happy automating!