Wednesday, December 17, 2008

Team Foundation Server - Simple Introduction for a tester

It is a tool from Microsoft for overall project collaboration. It has almost everything for a software development project such as source control, reporting, bug and requirement tracking, and team build. Before further talking about TFS lets spend some time understanding Visual Studio Team System VSTS.
MS- Visual Studio Team System is a powerful tool that integrates the entire team across the entire life cycle. It has solution to successfully, plan, build, deploy and test a project. According to Microsoft Visual Studio 2005 Team System is a productive, integrated, and extensible suite of life cycle tools that expands the Visual Studio product line to enable greater communication and collaboration among software development teams. VSTS is divided in Integration, Architecture, Development and Testing according to different team's requirements. In general, it is designed in such a way that all stakeholders can directly communicate with each other, can view each other's task and updates. So simply sating, it is a tool by Microsoft that provides guidance and communicates which item need to be worked on. And can customize it which ever methodology you follow.
Basically, two software development best practice methodology.

1.1 One is MS Solution Framework for agile software development, it is recommended and default methodology form team system. It is best for team for more rapid, ready for change environment with communication with customer and project having small team. Agile is targeted to smaller team members on team. Team system is also highly follow the philosophy, model introduced by agile alliance. Some of these methods are *individual interaction is more important than process and tool. *Customer collaboration is highly fruitful for project than customer contracts. *Responding to change according to situation makes positive impact on project rather than following plans

1.2 Another is MSF for CMMI: CMMI is about process improvement which appeals to larger projects, typically project with long- range planning and communication are more important rather than frequent release and feedback form customer. CMMI is a model for continuous process development.

It is targeted to reduced SDLC cycle times, improved ability to meet cost and schedule target and improve quality. It is a very formal methodology for SW development. Used for environment where team needs close communications and integrated work environment. Project management – create and manage team project Work item tracking: Create and track bug, Tasks, Change management – version control management to project. Build server – build management Continuous Integration Build (CIB) Project site – SharePoint Reporting – different reporting chart can be customized For a Tester's point of view, if someone is going to join a team which is using VSTS/TFS, understanding team project's structure will make job easy.
A team project has 5 main elements. Work Items, Documents, Reports, Team Build, and Source control. A Work Item is means the work to be completed on the project. It can be a bug, a task for adding new feature, writing a business document etc. And can be created by anybody involved in. Using document feature, once cad add project related document under document node. Reports node is for project status tracking, for example a bug report, daily status report. Team build node contains team builds; one can add new team build. Source Control node, by this one can access source codes. So, in conclusion TFS glues the whole project team and facilitates to collaborate between the various team members/roles. VSTS Test edition is for testing purpose (automation). But all are integrated in visual studio environment.

Tuesday, December 16, 2008

QTP Quick Test Professional interview question

1. How to create a new action?
-Open QTP
-Insert>call to new action>start recording to create an action
-make sure to check “Reusable action”
-Save it in the QC folder where you can remember

2. How to call an existing action for the existing scripts?
-Open QTP
-Insert>Call to existing Action
-save the called action

4. How to insert “Wait” command in scripts?
Browser("Welcome to the Config").Page("Edit Name_2").WebList("FamilyList").Select "ISE 1.0"
Wait (6)
Browser("Welcome to the Config ").Page("Edit Name_2").WebList("moduleSelect").Exist

5. ReportEvent: With “If-Then-Else” logics

If Browser("Welcome to the Config ").Page("Welcome to the Config ").Link("General").Exist then
Reporter.ReportEvent micPass,"web element","general present"
else
Reporter.ReportEvent micFail,"webelement","General not present"
End if
Browser("Welcome to the Config ").Page("Welcome to the Config ").Link("General").Click

Note: make a copy of your original one line script and replace “Click” with “Exist then” in the copied one.
Click return key and type reporter. And you will see bunch of report events. Select ReportEvent and hit space bar to provide space. You will see bunch of other pop up list. Select “micPass” and provide a comma to it. Afterward put comments and status results inside the double quotes i.e. reporter.ReportEvent micFail,"webelement","general not present". You can see this report in test results.

6. Insert Standard Check Points while recording
If your test case is asking to “delete template”, then when you hit “delete” you will see some kind of confirmation message to make sure the template has been deleted. Put the check point when you see the confirmation message. To insert checkpoints while recording, for instance you want to insert checkpoint for “Confirmation message” and you’ve have not stopped recording yet after clicking “delete”, then in QTP, select insert>checkpoint>standard checkpoint>select the delete confirmation message. Done

7. GetRoProperty: i.e. if you would like to get properties/value of an object

autofilltext=Browser("Config + Template Editor").Page("Config + Template Editor").WebElement("source_field_name").GetROProperty ("innertext")
msgbox autofilltext
If autofilltext="Velocity Template" Then
Reporter.ReportEvent 0,"Verify the 'Velocity template' box.","successfully identified Velocity template"
Else
Reporter.ReportEvent 1,"Verify the 'Velocity template' box.","Unable to identify Velocity template"
End If

You can give meaningful word to variable autofilltext for message box. Remove any operation i.e. Click right after dot at the end and replace it with GetRoProperty. To get the property of the object whether or not it is innertext or outertext, follow these steps. From QTP select ‘Object Spy’ and point it to the object you want to find its property and click the object. Once the object is clicked, property & values are saved in the Object Spy. Scroll down in the object spy window. You will see whether or not it is innertext or outertext. You can copy and paste it inside the parenthesis right after GetRoProperty.
And type msgbox
In if statement, value after assignment sign is the name of the object. Others are ReportEvent that we talked in Question 5

Note: usually you do not need to show message pop up if you’re running multiple test cases at night as when it pops up, it will stop other test cases to run until you click the pop up. So always comment it out for msgbox i.e. ‘msgbox autofilltext
8. Inserting Breakpoints
Usually break point are good when you don’t want to run whole script but upto some linke of the script.
If you point your mouse to the left side of the screen right next to your script and click to a particular line of the script, you will see big red dot. This is what called break point. Test run will stop to the point where you’ve placed your break point. This is easy tool specially when you’re are creating/testing/debugging scripts.
You can remove break point by clicking at the red dot.

9.How to FireEvent: Script for ‘Double-click’ ?
If you can not record for double clicking some object, you can generate a script for it. Here you got following script
Browser("Config + Template Editor").Page("Welcome to the Config ").WebButton("ABCD").Click
Now make it a double click action. Remove Click and type FireEvent, you will see popup with FireEvent and select it and inside double quotes, type “ondblclick” like the following
Browser("Config + Template Editor").Page("Welcome to the Config ").WebButton("ABCD").FireEvent"ondblclick"

10. How to use of the Data Table ?
Example script: Browser("Browser").Page("abc").WebEdit("USER").Set "ssharma"
a) Parameterization
simply provide multiple data in the same column. If these test data are valid, they qtp will run as many time as you have data
From QTP, Keyword Veiw>Select a value from the value column>click a parameter sign>Parameter>Give the object name in the name field such as USER from above example script. Now it will generate a column in the Global data table.

b) Tracking object values which can be replaced in the latter releases if data is deleted for some reason: from above example if you record a column in the
data table for USER (columnname) and data (ssharma), you can change value ‘ssharma to skhanal

11. GetItem(1)
getItem(1) function will pick first values in the picklist

If Browser("Welcome to the Config").Page("Welcome to the Config ").WebList("FamilyList").Exist Then
Browser("Welcome to the Config ").Page("Welcome to the Config ").WebList("FamilyList").GetItem(1)
Browser("Welcome to the Config ").Page("Welcome to the Config ").WebList("FamilyList").Select DataTable("FamilyList", dtGlobalSheet)
End if

12. how to use code/script to call an Excel Sheet?



Create a reusable action and type the following code:

Datatable.addsheet("login")

DataTable.Importsheet ( pathfinder.Locate( "[QualityCenter] Subject\Auto STD Regression Config+\login_info.xls")),"login","login"

For i = 0 to DataTable.GetSheet("login").GetRowCount -1

call Login(DataTable.Value("username", "login"), DataTable.Value("password","login"), DataTable.Value("url","login"))

datatable.Value("Result")="pass"
Next

DataTable.DeleteSheet("login")


13.How to make local object to globally available?
For Local Object Repository:
-Open the test on the QTP editor (Expert View)
-Resource>Object Repository
For Global Object Repository:
-Open the test on the QTP editor (Expert View)
-Resource>Object Repository Manager
You need to have both windows opened and simply drag and drop from local to global.
Once you move to global make sure to save it in the global repository.




14. How to export /import excel sheet?


User can make an Excel sheet with the required parameters and can import it to QTP when necessary. Ater creating excel sheet,open QTP, right click on any of the cells in the Data Table


File>Import.


a window pop-up box appears whether you will want to replace the contents of the current data table with the ones in the excel sheet.


Click OK .




Same way you can export data table into an external excel file. It is useful to use the required parameters in some different test run within QTP.
Or use script - Datatable.Export("path of file")

Special Thanks to guest writer who is using QTP for a while now. Please visit us next week for more on QTP.

Tuesday, December 2, 2008

Role of a Tester in requirement phase

The testing process should begin early stage in application development cycle.
Testers need a solid understanding of the product so they can devise better and more complete test plans, designs, procedures, and cases. Early test-team involvement can eliminate confusion about functional behavior later in the project life cycle. In addition, early involvement allows the test team to learn over time which aspects of the application are the most critical to the end user and which are the highest-risk elements. This knowledge enables testers to focus on the most important par
During the requirement phases of SDLC. the business requirements are defined on high level. During this phase a tester can come up with document testing approach to verify its quality, completeness, and correctness, can point out contradictory requirements.
More systematically, during the requirement phase, a tester can build a Acceptance Test Plan There are some formal approaches and documents which can be created during this phase. Such as:
Inspection/ Walkthrough:
System/Acceptance Test Plan:
Checklist:
Requirement Checklist:

Importance of Software Testing Theory

Every organization system operates under certain quality requirement. Software testing in an integral part of quality assurance and a tester can contribute to quality improvement by finding bug. A QA Analyst's responsibility is different then a tester's this role is responsible to create and in force standards and methods to improve overall software development and testing process.Technical excellence (person who is very good at finding system bugs, good at automation tools, scripting, and debugging) is not enough to be a good software QA tester. Knowledge about qa methodology and process is equally important to use that technical ability. At the requirement gathering and analysis phase some QA persons cannot understand what their role is in this phase of SDLC. Their understanding is that there is nothing to test now because no test cases are ready yet. But, a QA person has a big role to play to check standards of the requirements itself.
What I personally feel is if a QA tester is clear about QA methodology, standards, his thinking is not based only on the documents but he also questions himself what are they going to develop? What is there in documents? What is missing? What is not necessary? This questioning process takes his knowledge to mature level which reflects in his documentation, test case writing, and his overall performance in other phases of STLC.It is equally important for job search and interview. Question like 'when to start testing' is not that bad for a person who has drilled little bit QA methodologies. But I doubt it would that easy and to-the-point if a person doesn’t have methodological base. Sometime even software terms and terminologies put you in embracing situation during interview and during real work environment. Years back, my TL assigned me to walk new person through about project and testing. I spent significant effort to make him understand bug life cycle. He was actually testing bugs that were assigned to developers and not done. Here my intention is not to criticize him, but trying to tell that a tester person having knowledge of Bug life cycle and status would never touch a bug with 'not done' status and assigned to a developer.
Thanks-
//www.doqs.com/wpqatp.htmhttp://books.google.com/books?id=4bZ0VEZrfUUC&pg=PA257&dq=software+quality+assurance+theory+vs+practice&lr=&ei=xL2dSLG7Lp6ujgHwi6D7BA&sig=ACfU3U0Mx47bvx15eRkYYbWW8WFmhB8DSg

testing methodolofy - topics

Role of a Tester in requirement phase

A tester need to know about Logical and Physical design..

Business requirment are defined during the requirment phase. It is followd by logical design and refines requirement. Logical design is an abstract, and it is conceptual not physical.
Logical design is al about detail system framework and Logical architecture is the manner in which logical components of a solution are organized and integrated. The Architectural Design phase, where a software architecture for thei mplementation of the requirements is designed and specified, identifying the components within the software and the relationships between the components.
Physical Design describes how an information system will be physically implemented in order to meet its logical requirements. This involves specifying the technical (hardware and software) components that will enable the logical design specifications to be implemented.
The logical design phase is verified with static techniques. for example one module may need a particular data created by another module is not provided correctly. Static anlaysis can be applied to detect these types of control flow errors.
Integration test cases is a good approach to test it and determine whether all components interface properly, parameters are passed, and the file processing is correct. It doesnot verify that functionality is correct, only it perfrm as it is designed,

Sunday, November 30, 2008

Traceability matrix


Traceability matrix can be made more elaborate by tracing the requirements to the design to the code to the test cases. In this way we can come to know which requirement change will affect which part of the design and which part of the code and the test case.Usually this is an excel sheet.

Traceability matrix is one which tells the deviation in the current test process with the actual.A requirement Traceability Matrix is a document that traces user requirements from analysis through implementation. It can be used as a completeness check to verify that all requirements are present or that there are no unnecessary/ extra feature.

At each step in development cycle, the requirements code and associated test cases are recorded to ensure that requirement is addressed in the final system. Both user and developer have ability to easily cross - reference the requirements to the design , programming, test cases.