Hello Hello 2014,with a Snoozy Scenario of a Automation

Hello Automation Lovers,I just wanted to thanks a bunch for associating with uftHelp.com throughout 2013, and hope we further enrich this relationship in 2014.

Nothing much to share on the last eve of 2013, just an idea that how automation can be a boon for lethargic people like me :).

Coming to Scenario:-

We created Test Sheets for our “Keyword Driven Framework“,it was more than 
20 sheets and each having lot number of test steps.Now as are moving into Agile world, so are our clients, thus all of a sudden  they wanted each test step in test sheet to have a 
Test case-ID column with increasing values.

Solution:-
Manual Approach:- Go to each sheet and add Test Case ID to each Test step, and it is very monotonous and tedious task at least for a automation engineer.

So we created one simple script that  added TC-ID to all the Test Steps, which are
 added as comments to the test sheet(Comments begin with some symbol like in our case 
it was ‘X’).
Learn about Excel automation here…

Logic:- 
Add TC-ID in increment fashion where we are having comments.

Enjoy testing 🙂 and Happy New Year, 2014 …Cheers!!!!

Code:-

AddingRowToExcel Using UFT

Test Sheet:- ?, is where we needed the TC-ID to be added


Test Sheet for KeywordDriven Framework

How to append zero(0) to user defined date?

Scenario:- Creating date in user defined format like MM/DD/YYYY?

Solution:- In one of our application automation, we came across a situation, where we 
wanted to validate the date displayed on the AUT, for that we created the logical date to match with Actual Result .

But our validation was failing, reason being, for the single digit dates like 2nd month it was coming as ‘2’ but in our AUT it was getting displayed as ’02’.

Logic:-To overcome this situation we created very agile and simple function.
We separated the required date into month,day and year part, concatenated ‘0’ to all the 
parts and took the right most 2 digits, to create the required date format .We created date 
in the format of ‘MM/DD/YYYY’,and the given function can be modified to return date 
in any of the required patterns.


Date Formatting in UFT or QTP