Archive for the ‘Software Testing’ Category

Related Pages:
software testing life cycle, software testing methodologies, software testing tutorial, software testing certification, software testing tools, software testing jobs, software testing techniques, software testing interview questions and answers, software testing training

Selenium Remote Control (RC) is a test tool

Tuesday, October 20th, 2009

Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
Selenium RC comes in two parts.
1. A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
2. Client libraries for your favorite computer language.
The RC server also bundles Selenium Core, and automatically loads it into the browser.
Here is a simplified architectural representation
selenium-rc

Selenium Remote Control is great for testing complex AJAX-based web user interfaces under a Continuous Integration system. It is also an ideal solution for users of Selenium Core or Selenium IDE who want to write tests in a more expressive programming language than the Selenese HTML table format customarily used with Selenium Core.

Commonly Used Selenium Commands

Tuesday, October 20th, 2009

To conclude our introduction of Selenium, we’ll show you a few typical Selenium commands. These are probably the most commonly used commands for building test.

open
opens a page using a URL.
click/clickAndWait (more...)

How Selenium Works

Tuesday, October 20th, 2009

How Selenium Works
However, automation has specific advantages for improving the long-term efficiency of a software team’s testing processes. Test automation supports:

* Frequent regression testing
* Rapid feedback to developers during the development process
* Virtually unlimited iterations of test case execution
* Customized reporting of application defects
* Support for Agile and eXtreme development methodologies
* Disciplined documentation of test cases
* Finding defects missed by manual testing
how-it-works

Introducing Selenium Commands

Tuesday, October 20th, 2009

Introducing Selenium Commands
Script Syntax
Selenium Commands -- Selenese

Selenium provides a rich set of commands for fully testing your web-app in virtually any way you may imagine. This command set is often called selenese. These commands essentially create a testing language.

In selenese, certainly, one can test the existence of UI elements, based on their HTML tags, can test for specific content, can test for broken links, input fields, selection list, submitting forms, and table data. In addition Selenium commands support testing of window size (is true? must check the reference), mouse position, alerts, Ajax functionality, pop up windows, event handling, and many other features. The Command Reference (available at SeleniumHQ.org) lists all the available commands. (more...)

Selenium Tips and Tricks/FAQ

Tuesday, October 20th, 2009

Do check the reference manual here to get concepts of selenium locators
and the various commands that are available. You could get condensed version of the manual here.

Without reading the manual - You may easily miss useful commands like pause(to test session timeout), storeHtmlSource (you can potentially apply selenium regular expression to verify the values of hidden variables insides that html) , typeKeys (to do things like page up etc)
Assert vs verify: If you use seleniums verify command - then the test suite/case - will still run - and fail at the end. Hence in most cases you should use assert command which will cause the test to stop.
Sometimes selenium IDE may use "click" instead of "clickAndWait" for some (more...)

Software testing book for preparing testing interviews

Wednesday, September 23rd, 2009

I am in process to compile a list of good books on software testing. Soon I will share this list with you. But lately I am getting too many requests to share any book on software testing for preparing software testing interviews. So here is a quick post to share an online testing book I found “A Software Testing Primer” by Nick Jenkins.

Basically this book is an introduction to software testing. So those who are new to software testing field can start their preparation by reading this book. You will get basic idea of manual and automation testing.

Here is a summary of what this book is covering:

What is the need of software testing?
Different software development models
Testing in the software development life cycle
How to develop testing mindset?
Regression Vs. Retesting
White box Vs. Black box testing
Verification and validation
Alpha and beta testing
Unit, Integration and System testing
Acceptance testing
Automation testing - Basics
Testing the design
Usability testing
Performance testing
Test planning
Test estimation
Test cases and elements of test cases
Test tracking, Test planning and Test plan review
How to manage defects and defect reports?
Test metrics for testers
Product release control
In all this book is a nice introduction to software testing. Author explained some key software testing concepts like Regression and Retesting difference, Alpha and beta testing etc. where many testers get confused.

Download “Testing Primer” book:
To download this book Click here

IBM Rational Functional Tester Certification Details and Sample Paper

Wednesday, September 23rd, 2009

Rational Software Conference is conducted in major cities. There are many software testers who are aspiring to get IBM Rational professional certifications at these conferences.

IBM 000-842 (Rational Functional Tester for Java) Certification is a part of IBM professional certification. You can get this IBM 000-842 RFT certification at these conference centers during this Rational week.

RFT (Rational Functional Tester for Java) IBM certification details:
Test duration in minutes: 75
Approximate number of questions: 54
Passing score: 60
More info on: Rational Functional Tester

If you wish to take this IBM 000-842 (Rational Functional Tester for Java) Certification Exam at these conference centers, here is a sample question paper for your preparation:

Answers are provided at the page bottom.

Q: 1 How do you start the application under test?
A. use the Windows Start menu
B. simply begin recording
C. open a command line and start the application by typing its name
D. click the Start Application button on the recording toolbar

Q: 2 While recording a script, the recording monitor _____.
A. appears at the conclusion of recording
B. is only displayed on the toolbar
C. does not appear
D. displays a message for each action

Q: 3 What can be tested when recording a verification point?
A. an objects data only
B. an objects data or properties only
C. whether or not the object is working
D. an objects data, properties, or existence

Q: 4 What can you use to select an object as a verification point?
A. the object finder, the object picker, or the object browser
B. the main object browser, the test object browser, or the extra object browser
C. the object finder, the test object browser, or the delay method
D. the delay method, the scripting method, or the pointer method

Q: 5 A recording is started by:
A. Entering script record on the command line
B. creating a script and then pressing the record button in the RFT application
C. starting the application under test
D. Starting RFT

Q: 6 How do you stop recording?
A. click the Stop Recording button on the recording toolbar
B. end the application under test
C. close RFT
D. close the recording monitor

Q: 7 Which three actions are possible with RFT? (Choose three.)
A. use a wizard to substitute literals with datapool variables
B. substitute literals in verification points with datapool variables
C. create a datapool while recording a data-driven script
D. create scripts in c#

Q: 8 You must _____ a script with a datapool before substituting literal values in the script with references to datapool variables.
A. share
B. associate
C. run
D. disassociate

Q: 9 When is the best time to use data-driven testing?
A. when the test only needs to be run once
B. when the test steps change based on the test input data
C. when the test must be run multiple times with different data
D. when the test requires a lot of manual data entry

Q: 10 Functional Tester allows you to import an external datapool from which of the following? (Choose three.)
A. an external .csv file
B. another Functional Tester datapool
C. an existing TestManager datapool
D. an access (.mdb) file

Q: 11 What will the following CallScript do? CallScript (myScript, null, DP_ALL)
A. cause the script to run an infinite number of times
B. cause the script to iterate through the entire datapool
C. cause the script to run through 100 datapool values
D. cause myScript to always pass

Q: 12 what is one way to insert data-driven commands into the test script?
A. use the Insert Data Driven Commands button while recording
B. use the Insert Data Driven Commands button while executing
C. the commands are generated automatically while importing the datapool
D. use the super helper class after recording

Q: 13 What must you do before editing the datapool using an external application?
A. make it a public datapool
B. make it a private datapool
C. export it to a .csv file
D. import it from a .csv file

Q: 14 Which statement is true about an RFT test datapool?
A. It is exclusive for only one test script.
B. It is a collection of related data records.
C. It is automatically generated during script record.
D. It is a collection of related test scripts.

Q: 15 What must you do to view a comparator of a failed verification point from an RFT text log?
A. open a web browser and browse to open the file: \ \\.rftvd for the
verification point you want to view
B. right-click on the test log and select Failed Verification Points from the right-click menu, then select the
verification point you want to view
C. open the test log, right-click on the verification point line you want to view and select View Results from the
right-click menu
D. log results in another format since you cannot open a comparator from a text log

Q: 16 Given an existing TestManager Rational Test project, what are the steps to log results to TestManager?
A. from TestManager, create a new Test Script Type for RFT, then from RFT, select the Functional Test logging preferences to TestManager
B. from RFT, select the Functional Test logging preferences to TestManager, then select the Test Manager project when you run an RFT test
C. from RFT, associate the Rational Test Project with the RFT project, then select the Functional Test logging preferences to TestManager
D. from the Rational Administrator, associate the RFT project to the Rational Test Project, then from RFT, select the Functional Test logging preferences to TestManager

Q: 17 Out of the box, what are the different options for logging RFT tests?
A. HTML, text, custom, TestManager, and none
B. HTML, text, TPTP, TestManager, and none
C. TestManager, CQTM, TPTP, HTML, and none
D. HTML, PDF, text, TestManager, and none

Q: 18 Not including TestManager or custom logging, how can you organize RFT test results?
A. define and follow a naming convention for all test logs
B. define and follow a naming convention for all logs and log subfolders
C. create as many folders in the *_logs project as needed and drag logs into the appropriate folders
D. create additional log projects which are associated with the primary RFT project, (for example, _acceptance_logs)

Q: 19 How do you perform image verification in a test?
A. select Perform Image Verification Point from the Verification Point and Action Wizard
B. select the Perform Properties Verification Point from the Verification Point and Action Wizard, then select only
the .src or other property for the image
C. download and install the RFT Enhancement Pack plug-in from IBM Rational Support
D. download and install the Image Comparator for Rational Functional Tester 2003.06 utility from developer Works

Q: 20 What should the tester open to view Test Objects, Main Data Area and Recognition Data?
A. the test script
B. the test comparator
C. the object map
D. the log viewer

Q: 21 What should the tester do to open the comparator in an HTML log after the test has been played back?
A. select View > Failures from the menu
B. click the View Results link in the test log
C. nothing, because the comparator open automatically
D. select Open > Comparator from the menu

Q: 22 What should the tester view to discover the current script action being executed?
A. playback monitor
B. the execution window
C. the test script
D. the application under test

Q: 23 The two phases of playing back a script are script development and _____.
A. unit testing
B. manual verification
C. reviewing results
D. regression testing

Q: 24 The tester resets their test environment and sets the playback environment. What is the tester ready to do?
A. record the test
B. set recording options
C. view and analyze the results
D. play back the script

Q: 25 If a test fails because the tester has updated the test data, what should the tester do to prevent continued failures?
A. re-record the test
B. use the comparator and update the baseline data
C. nothing, because the test is supposed to fail
D. change the test data

Answers:
———–
1. Answer: D
2. Answer: D
3. Answer: D
4. Answer: C
5. Answer: B
6. Answer: A
7. Answer: A, B, C
8. Answer: B
9. Answer: C
10. Answer: A, B, C
11. Answer: B
12. Answer: A
13. Answer: C
14. Answer: B
15. Answer: B
16. Answer: C
17. Answer: B
18. Answer: A
19. Answer: D
20. Answer: B
21. Answer: B
22. Answer: A
23. Answer: D
24. Answer: D
25. Answer: B

Regression Testing with Regression Testing Tools and methods

Wednesday, September 23rd, 2009

What is Regression Software Testing?
Regression means retesting the unchanged parts of the application. Test cases are re-executed in order to check whether previous functionality of application is working fine and new changes have not introduced any new bugs.

This is the method of verification. Verifying that the bugs are fixed and the newly added feature have not created in problem in previous working version of software.

Why regression Testing?
Regression testing is initiated when programmer fix any bug or add new code for new functionality to the system. It is a quality measure to check that new code complies with old code and unmodified code is not getting affected.
Most of the time testing team has task to check the last minute changes in the system. In such situation testing only affected application area in necessary to complete the testing process in time with covering all major system aspects.

How much regression testing?
This depends on the scope of new added feature. If the scope of the fix or feature is large then the application area getting affected is quite large and testing should be thoroughly including all the application test cases. But this can be effectively decided when tester gets input from developer about the scope, nature and amount of change.

What we do in regression testing?

Rerunning the previously conducted tests
Comparing current results with previously executed test results.
Regression Testing Tools:
Automated Regression testing is the testing area where we can automate most of the testing efforts. We run all the previously executed test cases this means we have test case set available and running these test cases manually is time consuming. We know the expected results so automating these test cases is time saving and efficient regression testing method. Extent of automation depends on the number of test cases that are going to remain applicable over the time. If test cases are varying time to time as application scope goes on increasing then automation of regression procedure will be the waste of time.

Most of the regression testing tools are record and playback type. Means you will record the test cases by navigating through the AUT and verify whether expected results are coming or not.
Example regression testing tools are:

Winrunner
QTP
AdventNet QEngine
Regression Tester
vTest
Watir
Selenium
actiWate
Rational Functional Tester
SilkTest
Most of the tools are both Functional as well as regression testing tools.

Regression Testing Of GUI application:
It is difficult to perform GUI(Graphical User Interface) regression testing when GUI structure is modified. The test cases written on old GUI either becomes obsolete or need to reuse. Reusing the regression testing test cases means GUI test cases are modified according to new GUI. But this task becomes cumbersome if you have large set of GUI test cases.

ISTQB question pattern and tips to solve

Tuesday, September 22nd, 2009

ISTQB paper pattern and tips on how to solve the questions quickly. To start with, here are 10 sample ISTQB ‘Foundation level’ questions with detailed explanation for answers.

ISTQB question pattern and tips to solve:
ISTQB questions are formatted in such a way that the answers look very much similar. People often choose the one, which they are more familiar with. We should carefully read the question twice or thrice or may be more than that, till we are clear about what is being asked in the question.

Now look at the options carefully. The options are chosen to confuse the candidates. To choose the correct answer, we should start eliminating one by one. Go through each option and check whether it is appropriate or not. If you end up selecting more than one option, repeat the above logic for the answers that you selected. This will definitely work.

Before you start with the question papers, please read the material thoroughly. Practice as many papers as possible. This will help a lot because, when we actually solve the papers, we apply the logic that we know.

ISTQB ‘Foundation level’ sample questions with answers:

1. Designing the test environment set-up and identifying any required infrastructure and tools are a part of which phase

a) Test Implementation and execution
b) Test Analysis and Design
c) Evaluating the Exit Criteria and reporting
d) Test Closure Activities

Evaluating the options:
a) Option a: as the name suggests these activities are part of the actual implementation cycle. So do not fall under set-up
b) Option b: Analysis and design activities come before implementation. The test environment set-up, identifying any required infrastructure and tools are part of this activity.
c) Option c: These are post implementation activities
d) Option d: These are related to closing activities. This is the last activity.

So, the answer is ‘B’

2. Test Implementation and execution has which of the following major tasks?

i. Developing and prioritizing test cases, creating test data, writing test procedures and optionally preparing the test harnesses and writing automated test scripts.
ii. Creating the test suite from the test cases for efficient test execution.
iii. Verifying that the test environment has been set up correctly.
iv. Determining the exit criteria.

a) i,ii,iii are true and iv is false
b) i,,iv are true and ii is false
c) i,ii are true and iii,iv are false
d) ii,iii,iv are true and i is false

Evaluating the options:
Let’s follow a different approach in this case. As can be seen from the above options, determining the exit criteria is definitely not a part of test implementation and execution. So choose the options where (iv) is false. This filters out ‘b’ and ‘d’.

We need to select only from ‘a’ and ‘c’. We only need to analyze option (iii) as (i) and (ii) are marked as true in both the cases. Verification of the test environment is part of the implementation activity. Hence option (iii) is true. This leaves the only option as ‘a’.

So, the answer is ‘A’

3. A Test Plan Outline contains which of the following:-

i. Test Items
ii. Test Scripts
iii. Test Deliverables
iv. Responsibilities

a) I,ii,iii are true and iv is false
b) i,iii,iv are true and ii is false
c) ii,iii are true and i and iv are false
d) i,ii are false and iii , iv are true

Evaluating the options:
Let’s use the approach given in question no. 2. Test scripts are not part of the test plan (this must be clear). So choose the options where (ii) is false. So we end up selecting ‘b’ and ‘d’. Now evaluate the option (i), as option (iii) and (iv) are already given as true in both the cases. Test items are part of the test plan. Test items are the modules or features which will be tested and these will be part of the test plan.

So, the answer is ‘B’

4. One of the fields on a form contains a text box which accepts numeric values in the range of 18 to 25. Identify the invalid Equivalence class
a) 17
b) 19
c) 24
d) 21

Evaluating the options:
In this case, first we should identify valid and invalid equivalence classes.

Invalid Class | Valid Class | Invalid Class
Below 18 | 18 to 25 | 26 and above

Option ‘a’ falls under invalid class. Options ‘b’, ‘c’ and ‘d’ fall under valid class.

So, the answer is ‘A’

5. In an Examination a candidate has to score minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks. Identify the Valid Equivalence values if the student clears the exam.

a) 22,23,26
b) 21,39,40
c) 29,30,31
d) 0,15,22

Evaluating the options:
Let’s use the approach given in question 4. Identify valid and invalid equivalence classes.

Invalid Class | Valid Class | Invalid Class
Below 24 | 24 to 40 | 41 and above

The question is to identify valid equivalence values. So all the values must be from ‘Valid class’ only.

a) Option a: all the values are not from valid class
b) Option b: all the values are not from valid class
c) Option c: all the values are from valid class
d) Option d: all the values are not from valid class

So, the answer is ‘C’

6. Which of the following statements regarding static testing is false:

a) static testing requires the running of tests through the code
b) static testing includes desk checking
c) static testing includes techniques such as reviews and inspections
d) static testing can give measurements such as cyclomatic complexity

Evaluating the options:
a) Option a: is wrong. Static testing has nothing to do with code
b) Option b: correct, static testing does include desk checking
c) Option c: correct, it includes reviews and inspections
d) Option d: correct, it can give measurements such as cyclomatic complexity

So, the answer is ‘A’

7. Verification involves which of the following:-
i. Helps to check the Quality of the built product
ii. Helps to check that we have built the right product.
iii. Helps in developing the product
iv. Monitoring tool wastage and obsoleteness.

a) Options i,ii,iii,iv are true.
b) i is true and ii,iii,iv are false
c) i,ii,iii are true and iv is false
d) ii is true and i,iii,iv are false.

Evaluating the options:
a) Option a: The quality of the product can be checked only after building it.
Verification is a cycle before completing the product.
b) Option b: Verification checks that we have built the right product.
c) Option c: it does not help in developing the product
d) Option d: it does not involve monitory activities.

So, the answer is ‘B’

8. Component Testing is also called as :-
i. Unit Testing
ii. Program Testing
iii. Module Testing
iv. System Component Testing .

a) i,ii,iii are true and iv is false
b) i,ii,iii,iv are false
c) i,ii,iv are true and iii is false
d) all of above is true

Evaluating the options:
a) Option a: correct, component testing is also called as unit testing
b) Option b: not sure (but as all the options indicate this as true, we can conclude that Program testing is also called as unit testing)
c) Option c: correct, component testing is also called as module testing
d) Option d: wrong. System component testing comes under system testing.

So, the answer is ‘A’

9. Link Testing is also called as :
a) Component Integration testing
b) Component System Testing
c) Component Sub System Testing
d) Maintenance testing

Evaluating the options:
As the name suggests, this testing is performed by linking (say modules). Now if
we look at the options, only option ‘a’ is performed by linking or integrating
modules/components.

So, the answer is ‘A’

10.
ISTQB questions 10

What is the expected result for each of the following test cases?
A.TC1: Anand is a 32 year old married, residing in Kolkatta.
B.TC3: Attapattu is a 65 year old married person, residing in Colombo.
a) A – Issue membership, 10% discount, B–Issue membership, offer no discount. B
b) A – Don’t Issue membership, B – Don’t offer discount. C
c) A – Issue membership, no discount, B – Don’t Issue membership.
d) A - Issue membership, no discount, B- Issue membership with 10% discount.

Evaluating the options:

ISYQB answer 10
Explanation:
For TC1: follow the path in green color
(The person is Indian resident, so select only ‘True’ options.
The person is aged between 18-55, so select only ‘True’
The person is a married, so again select only ‘True’
For this person, the actions under ‘Rule 4? will be applied. That is, issue membership and no discount)

For TC3: follow the path in blue color
(The person is not Indian resident, so select only ‘False’ (under Rule 1)
The person is not aged between 18-55. No need to select any path, as it is written “Don’t care”.
The person is married. No need to select any path, as it is written “Don’t care”.
For this person, the actions under ‘Rule1? will be applied, That is, Don’t issue membership and no discount.)

So, the answer is ‘C’

Note: The answers are based on writers own experience and judgment and may not be 100% correct. If you feel any correction is required please discuss in comments below.

Please feel free to ask any question related to ISTQB exam and testing certifications in comment section below.


Testing Web Services With a Standard Web Vuser

Tuesday, September 22nd, 2009

It is possible to test web services using the standard Web (HTTP/HTML) virtual user type instead of the Web Services vuser type. The main disadvantage of this is that you cannot generate your SOAP body from the WSDL file using the VuGen wizard. But if you know what your XML request should look like, then you shouldn’t have any real problems.
Here are my tips:
Send your SOAP payload using lr_custom_request().
Add a SOAPAction HTTP header using web_add_header().
Remove unnecessary HTTP headers (that are generated automatically by VuGen) with web_remove_auto_header().
Don’t forget to verify that you get a valid response. Use web_reg_find() for a simple check. For better verification of the SOAP response use lr_xml_find().
To extract values from the response body, use lr_xml_get_values(). Brush up on your XPath qeries beforehand though.
It may be necessary to HTML-encode some characters in your XML/SOAP message (e.g. convert “&” to “&”). Unfortunately VuGen does not provide this functionality (but HP could easily add it to the web_convert_param function), so you will have to either write (or find) a function to do it, or convert all the entries in your data table before running the script.
As an example, here is a simple script that makes use of a web service that will look up the source of a Shakespeare quote for you. The WSDL is available from http://www.xmlme.com/WSShakespeare.asmx?wsdl.

Action()
{
// ContentCheck Rules for known error messages
web_global_verification("Text=Speech not found", "ID=SpeechNotFound", LAST);

lr_start_transaction ("Search For Shakespeare Quote");

// By default, VuGen sends a user-agent header.
// Let's remove this as an example of removing automatically generated headers.
web_remove_auto_header("User-Agent", "ImplicitGen=No", LAST);

// Add a SOAPAction HTTP header
web_add_header("SOAPAction", "http://xmlme.com/WebServices/GetSpeech");

// Save entire body from the HTTP response for later checking with lr_xml_find.
web_reg_save_param("ResponseBody",
"LB=",
"RB=",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);

// Note that the text to search for would normally be replaced with a parameter,
// and so would the element of the below SOAP message.
web_reg_find("Text=TWELFTH NIGHT", LAST);

web_custom_request("Search Shakespeare",
"URL=http://www.xmlme.com/WSShakespeare.asmx",
"Method=POST",
"Resource=0",
"Referer=",
"Snapshot=t1.inf",
"Mode=URL",
"EncType=text/xml; charset=utf-8",
"Body=" // As it is SOAP, you are unlikely to have to use BodyBinary, unless your request has CDATA.
"< ?xml version=\"1.0\" encoding=\"utf-8\"?>"
""
"
"
""
"Be not afraid of greatness"
"
"
"
"
"",
LAST);

// The response from the web service looks like this:
/*
< ?xml version="1.0" encoding="utf-8"?>




<SPEECH>
<PLAY>TWELFTH NIGHT</PLAY>
<SPEAKER>MALVOLIO</SPEAKER>
'Be not afraid of greatness:' 'twas well writ.</SPEECH>


*/

// An example of extracting the a value from a SOAP reponse.
// This saves the element into {OutputParameter}.
// The same syntax could be used with lr_xml_find to check the response.
lr_xml_extract("XML={ResponseBody}",
"XMLFragmentParam=OutputParameter",
"Query=/soap:Envelope/soap:Body/GetSpeechResponse/GetSpeechResult", LAST);
lr_output_message("Source of Shakespeare quote: %s", lr_eval_string("{OutputParameter}"));

lr_end_transaction ("Search For Shakespeare Quote", LR_AUTO);

return 0;
}