My Blog List

Wednesday, July 25, 2012

Common QTP Topics/Questions

Here I am listing out some common QTP topics those are concentrated on most QTP interviews. Hope this will help lot of QTP beginners.

1. Why we go for automation?
2. What is Action? What are the types?
3. What is function? What is Sub? Diff between these two?
4. What is OR? Types of OR?
5. Which kind of OR is best?
6. What is TO? What is RO?
7. How QTP identifies object in UI and does the operations?
8. What are types of properties for a object? Mandatory, Assistive, Ordinal Identifiers.
9. What is smart Identification?
10.What is Synchronization? What are the synchronization methods available?
11.How you generated your results?
12.How you will email the results automatically after execution?
13.What is framework? Have you worked/designed a framework?
14.VBScript - String functions, Array, FileSystemObject, DictionaryObject
15.Connecting Excel and fetching data?
16.Connecting database and fetching data?
17.What kind of applications you have automated?
18.What kind of controls you automated? Native Controls, Thir party controls, etc..
19.What is DP? Why we go for DP? What are DP approaches?
20.Write a script for this scenario using DP?
21.How you handled error recovery?
22.Framework - Driver Script, TestData, Config Files, OR files, Reusable function Librarty
23.Tell me some re-usable components you have written?
24.What is environment variables? What is the purpose? How you will get/set value?
25.What is AOM - Automation Object Model? How to use this?
26.Have you worked in batch run?
27.Have you integrated QC with QTP and executed script from QC?
28.What are the type of files under each action and test? What are the extensions?
29.What is DataTable? How to use that?
30.What is Option Explicit? Why we are using this?
31.Regular expressions?
32.Checkpoints and its usage? types?
32.etc...

Monday, July 23, 2012

Agile Model - SCRUM Process Overview

Lot of testers have interest to know about,
1. What is agile model?
2. What is the advantage of it over other models?


Agile - Simply we can say "On demand, more monitored and controlled testing"
Agile model have benefits like,
1. Easy adoption of requirement changes at any stage.
2. Piece of working product will be arrived very early in life cycle.
3. More monitoring on team so every team members will be in same path and goal.


SCRUM is one of a process of agile methodology. SCRUM involves below terms,
1. Sprint
2. Scrum master
3. User Stories
4. Work Items
5. Sprint Back Logs
6. Sprint retrospective item, etc.


Sprint - Sprint is nothing but the scrum period. i.e. The no of days for between each release like 30 days, 15 days. This is mainly based on customer requirement. If your every sprint consists 30 days, then every 30 days there will be a release. Sometimes release will not be there based on customer request.


Scrum Master - The person responsible to assign the tasks to team members and monitor the team.


User Stories - User Stories are the original requirements from customer. This may be "New functionality" or "Change Request".


Sprint Work Items - Work Items are the Task items created by Scrum Master with Estimated time for each User story. Normally scrum master will create task item for each user story and assign it to some team member with estimated time.


Sprint BackLog Item - Sprint back log items are the sub task items created by every team member for each assigned work item. Team member will create this sprint back log item for each assigned work item and he will set estimated time. This is used to track the daily effort done by team member and to update the status like how much hrs actually worked on this sprint back log item. Automatically this will affect the Work Item related to this Sprint back log item. So finally the User story will be finished by doing all the work items related to that user story.


Sprint Retrospective Item - Retrospective item will be created after sprint release. This should cover the answers for below 2 questions.
1. What went well?
2. What can be Improved?


Now, you should be aware of above terms. Let's see, how actually scrum will be followed in real time projects.
1. Customers will enter the User Stories in your ALM system like TFS, QC, etc.
2. Once received user stories, scrum master will arrange a meeting called Sprint Planning Meeting
3. In Sprint planning meeting, scrum master will discuss with team members like
    What are the user stories we can select for this sprint?,
    Which user story going to handle every team member?, etc.
4. After planning meeting, scrum master will create Sprint Work Items for each user story and assign them to team members. For ex. Login Module is the user story. For this story, scrum master will create work items like Development of Login Module, Testing of Login Module, Regression and Retesting of Login module, etc. and he/she will put the estimated time to finish each work item.
5. Now, team members will pick up their work item and create Sprint Back Log Items i.e. sub work items. For ex. Team member will create sprint back log items like UI development, functionality development, unit testing, etc for Development of Login module work item.
6. Daily team members will work on their tasks and update their actual worked hours (i.e. burning worked hours) against estimated hours in sprint back log items.
7. This will give progress status for every sprint back log item which in-turn update sprint work item's progress. Finally every one can able to know the progress status of each user story.
8. Daily 10 to 15 mins quick meeting will be arranged by scrum master to update daily status, showstoppers and any blockings to continue the planned tasks. Based on this, they will continue their progress. This is called Daliy Scrum Meeting
8. Once everything is OK and working fine and tested, then we will go for release.
9.After the release, scrum master will arrange a meeting called Sprint Retrospective Meeting. In this meeting, every will discuss about the 2 points mentioned above and will create retrospective items if any.
10. In future releases, team members will concentrate to cover the created retrospective items as part of sprint tasks.


Hope this will give you basic idea about the scrum process in agile model...

Friday, July 20, 2012

What is Framework?

Today, I am going to discuss about framework due to request of my friend Anand.


Lot of QTP guys know the information on How to Create Test, How to identify Complex objects, How to generate results and etc. But still somebody have doubts like
What is Framework?
Why we need Framework?
What's the purpose of it?
How to design framework?
Is that required lot of coding knowledge?, etc.


Let's consider a case. We have 100 test scenarios to automate. Each test scenario have around 100 test cases. Here you will do the following....
Design:
1. Create Test Scripts for each case by creating separate actions.
2. Each test case script i.e. each action will have associated resources. - Object Repository, Function Library and Recovery Scenario files.
Execution:
1. You will have own driver script.
2. This will call each action one by one.
Maintenance:
1. If any UI changes happened, you need to find the particular OR file to update the same.
2. You need to maintain lot of OR files which is a tough task.
3. If any new resource joined in Team, its tough task to give KT and to get on track.


So, you have lot of drawbacks in your script generation, execution and mainly on Maintenance phase. This will not give estimated ROI for clients. So,
1. How to reduce these complexities?
2. How to make our task easy?


Here we go...
Framework - Framing our work. How we are framing our automation work i.e. Script Design, execution and maintenance of our automation project which will yield good results on below points.
1. Easy script generation.
2. Maximum Re-Usability.
3. Low maintenance cost.
4. Easier execution of scripts for every new builds based on our decisions.
5. Ability to design test scripts using Non-Technical testers, Business Analysts, etc.


Let's design a sample framework for QTP for the same case we talked above.
Framework Design:
1. Let's create some folder structure which will help us to keep our files in respective folder. This will help a lot while our project grows.
2. Create a folder "MyApp-Automation" - Under this folder,
       Create a folder "Function Library" - Under this, maintain all our function libraries like .vbs, .qfl    and .txt files.
       Create a folder "Object Repository" - Under this, maintain OR files. Create a Shared OR for different modules or Create a Shared OR for each application.
       Create a folder "Data Files" - Under this, maintain all test data excel files, Scenario files, Test Cases files, etc.
       Create a folder "Config Files" - Under this, maintain all configuration files whether in .ini or .xls format. Maintain all the data required globally for execution of any test in these files so that we can read and set these values as Environment Parameters to access through out our execution scope.
       Create a folder "Results" - Under this, export our results after execution by creating a subfolder with name as "MyTest_CurrentDate_Time".
Test Design:
1. First identify the available functionalities, test cases and flow of business. Based on your analysis, design some re-usable functions like Login, CreateTxn, DeleteTxn, Logout, etc.
2. Then go and create Test Case Script. Here just you can use all your re-usable functions already written. No need to write again and again code for same functionality. This will reduce your script design time as well as maintenance time.
Execution:
1. Add a field "Execute?" in your TestScenarios file and mark as "Yes/No" based on your execution requirement.
2. The same way, add this field for TestCases sheet and mark as Yes/No.
3. Now design your DriverScript like,
   a) Read the Test Scenarios file.
   b) Check Execute field. If Yes, goto TestCases file for this TestScenario.
   c) Read TestCases. If Yes, execute this case. i.e. Call the function for this case like "Call TS1_Case_001". Here Case_001 is the function for your TestCase TS1_Case_001.
   d) The same way, it will loop for all cases under the Test Scenario and then will pickup and loop for all Test Scenarios.
4. So, the only initial point is your Driver Script after setting up your requirement for execution and test data.
Maintenance:
1. Here you have minimum number of OR files based on application or modules. So if any UI changes happened in application, its easy to find and update values.
2. Also, if any functionality is changed in your application, just go and modify in your re-usable function. That's enough, it will affect all the cases as the re-usable function only called inside all the cases. No need to open each case and modify.
3. Even manual testers or business analysts can design test script because we have ready made functions for all functionality. Only thing they should know, purpose and use of each re-usable function which we can deliver by creating a documentation.


Types:-
For the types of frameworks, you will find lot of resources in web. Just Google it. Just providing the main types available.
1. Keyword-Driven
Our designed re-usable functions are Keywords.
2. Data-Driven
Your test data is driving your test. i.e. Your single test will run multiple times with different data each time.
3. Hybrid
Any combinations for more than one kind of framework.


So, I hope now you might have some idea about framework and you might be in the position to answer all the questions I have listed on top.
Why are waiting? Start creating your framework now !!!


Here are some links:-
http://www.youtube.com/watch?v=XGr5HC8VrAI
http://www.youtube.com/watch?v=rB3r7Dp_jyM