Sunday, December 29, 2013

How to encourage testing within your organization

On interacting with testers in various forums, one thing amazes me. Even today, there are organizations developing software but with little or no testing processes. It is not that they do not test at all. The developers test their code but there is no "tester" testing. Or testing is not institutionalized. If you work for such an organization and want to encourage testing, here are a few tips for you to consider.

Saturday, December 28, 2013

When Manual Testing is better than Automated Testing

Manual testing is testing done by the tester using his intellect but without the use of automated testing tools. Manual testing has possible disadvantages. It can be expensive in effort, have human mistakes or just be boring. Even so, manual testing continues to be very popular because of its powerful advantages. Since manual testing is done by a human being and not a program, the test design and test execution can be changed very quickly. Manual testing is done using the creative and analytical skills of the tester and it requires no investment in software testing tools. Now, let us see the situations where manual testing is the better option due to technology limitations of today.

Wednesday, December 25, 2013

How video game testers work?

Video games or computer games are available on a number of devices such as consoles, computers and mobiles. They are enjoyed by countless number of people. Video games have existed for a long time now. However, with artistic and technological advances, the video games have become very complex. This complexity needs serious game testing. Game testing is intense work but fulfilling because the game industry is growing rapidly. Game testing involves a number of tasks. It also needs a passion for playing games. The role of a game tester is to provide objective information about the game. What are the good things about the game? What things about the game should change? Are there any bugs or glitches in the game? Does the game work with good performance?

Learn from my video, How to Test Games Software or read on.

Game Testing

The main objective of a game is to have fun. The definition of fun is different for different gamers. The game tester has to know the target users and what they find enjoyable. Other than the fun element, a game may have objectives like developing cognitive/ motor skills or gamer education. Moreover, a game may have a background, a timeline, a plot, characters, theme, graphics, events, scores, levels, paths and other elements. The game tester needs to test each of the above elements with respect to the game objectives and contemporary games in the market. From the first testable code through to release, the game developers provide game builds to the game tester. The game tester should run the following tests.

Installation testing
Unless it is a (totally) web-based game or an embedded game, there is some software that the player needs to install on their device first. The installation process has a series of steps that need to be tested on each supported device configuration used by gamers. The game tester should run the steps on each supported device configuration. He should also check the completeness and accuracy of the content in the installation guide.

Feature and Functional testing
This is the most important game test. Typically, the game would have a number of features. The game tester should test the game features fully. The items that need to be tested include basic game play like start/ suspend/ resume/ stop/ start a saved game, game options, progression from one level to the next, correct scores and correct working of the controls. Then, the game tester should test if the game is true to its background, timeline, theme, plot, characters and other elements. The game tester should also test game events, if any and concurrency of multiple gamers in multi-player games.
In order to find the bugs, the game tester should be creative by taking different paths and performing unexpected actions in the game. In addition to finding the bugs, the game tester should estimate how well the game meets its objectives. Also, identify improvement opportunities in the game.

User Interface (UI) testing
This is also an important game test. UI testing includes testing of the graphic elements (e.g. characters in the plot, backgrounds, floors, objects and people) and the content (both viewable and audible). If the game is targeted for multiple languages and cultures, the game tester should test it in each supported language.

Performance testing
A novel story line, incredible graphics, sounds, music and numerous well-integrated features of a game may still fail to satisfy the player if the game is too slow or freezes. The game tester should test the speeds of operation of the game on supported device configurations. The game tester should also play the game at extremes, for example, run a complete game without any pauses at all or run a game continuously for 24 hours or keep on increasing the number of players if the game is multi-player. These tests show the performance bugs.

Alpha test and Beta test support
Once the game development is complete, it is released to few reviewers (alpha test). The game tester should explain the game details to the alpha testers and get their feedback. Then gather alpha test bugs or improvement opportunities, confirm these and pass the valid bugs and change requests to the developers. The game tester should test the game changes and bug fixes before the new build is given to the alpha group.
Once the game is released to a limited number of gamers for their review (beta test), the game tester should confirm the bugs reported by beta testers. Then provide these to the developers. The game tester should test the bug fixes before the final release of the game to market.

Sunday, December 22, 2013

Software Testing Estimation

Software testing effort estimation is a skill required of a Test Lead or a Test Manager. However, test effort estimation is not a skill that one can learn quickly. It requires understanding of several key concepts and practice.  In the previous post on estimation techniques, we have seen six approaches to get software test effort estimates. In this post, we will look at one possible software testing estimation formula. Before using it, you need to customize it according to your test process. This formula is explained with an example in my video on Test Estimation with formula example.

Software Testing Estimation Formula

Task Usage notes Cumulative Effort Estimate(hours)
QA/test environment preparation Estimate this based on hardware installation, software installation and deployment of builds as T1 T1
Testing of n requirements Estimate testing time per requirement, T2, based on the detail of requirements e.g. T2 can be 0.5 if requirements are detailed or up to 4 if the requirements are high level. T1 + T2 * n
Negative and exploratory testing Use, say, 40% extra testing time per requirement, to cover the paths other than the “happy path”, and exceptional and invalid test data inputs. T1 + T2 * n * 1.4
Re-testing due to requirement correction or changes Estimate factor T3, based on requirement correctness and stability e.g. T3 can be 0.1 if requirements are well put and stable or 0.5 if requirements have multiple issues or are very dynamic. Let us use T3 as 0.2. T1 + T2 * n * 1.6
Logging defects and re-testing fixes Estimate the number of defects as T4. Estimate time to log defect, say 0.25 and time to re-test a fix, say 0.25 T1 + T2 * n * 1.6 + T4 * 0.25 + T4 * 0.25
Regression testing Estimate this effort based on the impact of requirements implemented, defects and depth needed as T5. T1 + T2 * n * 1.6 + T4 * 0.5 + T5
Reserve Having this reserve helps to provide time to complete unforeseen tasks. Estimate the reserve as T6 between 5 and 10% of overall effort (T1 + T2 * n * 1.6 + T4 * 0.5 + T5) * (1 + T6)
Communication Estimate the daily effort in hours on meetings and reporting as T7. Multiply it by team members T8 and number of testing days T9. (T1 + T2 * n * 1.6 + T4* 0.5 + T5) * (1 + T6) + T7 * T8 *T9

Now let us see an example. Assuming the following:
Test environment preparation time, T1 = 2 hours
Number of requirements, n = 100
Time to test each requirement, T2 = 0.5 hours
Number of defects, T4 = 10
Regression testing time, T5 = 8 hours
Reserve, T6 = 5% i.e. 0.05
Daily time spent on meetings and reporting, T7 = 0.5 hours
Number of testers, T8 = 2
Number of testing days, T9 = 5
(T1 + T2 * n * 1.6 + T4* 0.5 + T5) * (1 + T6) + T7 * T8 *T9 becomes
(2 + 0.5 * 100 * 1.6 + 10* 0.5 + 8) * (1 + 0.05) + 0.5 * 2 *5 = 104.75 hours
This time includes the time to set up the test environment, positive/ negative/ exploratory testing of requirements, re-testing requirement clarifications/ changes, logging defects and re-testing fixes, regression testing, meetings and reporting.

There are several ways to confirm your software testing effort estimate.  Use your judgment to find if it looks too low, right or too high. Compare it with the actual testing efforts data for previous projects. Find out if it is 25% - 30% of development effort (do not know why but I have noticed that this range seems acceptable to project managers). You can also ask other managers to review your estimate. Once you have arrived at the test effort estimate for your project and have convinced the stakeholders that it is a reasonable estimate, track the actual progress in your project constantly to see if it is in line with your estimate.

Significant deviation from software testing effort estimate may have financial implications. If you end up charging for more testing effort, the client would not be happy. Alternatively, if it a fixed-price project, you company would not be happy with reduced profitability that comes with higher actual effort. Realistic estimation is important to pay attention to coming up with the suitable formula, estimate the factors realistically and confirm your estimate by using alternative approaches.

Wednesday, December 11, 2013

Tester role in agile software testing

Agile software development is very popular in the current software industry. Agile places emphasis on constant communication and collaboration within the team and with the customer. Its objective is to develop increasingly functional software in a dynamic requirements landscape. Agile projects run differently from projects using Waterfall model or Iterative model. Testers working in Agile projects should be familiar with their role therein.

Thursday, October 31, 2013

Selenium IDE and Selenium WebDriver Training Videos - learn automated testing

In the last few years, I have had the opportunity to interact with hundreds of testers who want to have more than just manual testing skills. They want to learn Automated Testing, or Test Automation as it is commonly called. I prefer to call it Automation because it is not restricted to testing something with a computer program. Automation can be used for other productive tasks like generating or setting up test data, log bug reports, prepare release notes and doing other administrative tasks.

The problem that I see (painfully) very often is that some testers feel that they can download a functional web testing tool, read a few blog posts or watch a couple of videos to see how it works and they will have test automation skills. Not quite. These folks have hardly done any coding or written any automation program. In many cases, they don't even recall basic HTML syntax. When they build some automation, they are at the mercy of web test recordings, which are very fragile. If there is something that cannot be recorded e.g. a condition or a loop, they search some source code on the web, which meets their exact requirement. They are afraid to modify this source code because they really don't understand it. Then the automation that they manage to hack together doesn't work too often. More seriously, it suffers from unknown issues. It's a big problem.

You can solve this problem by using our Selenium IDE and WebDriver training videos. The training videos start with training on HTML, CSS, XPath before training on Selenium IDE (the record/script and playback tool) all in detail. This builds a strong foundation in testing web apps using not only Selenium but also any other functional testing tool because the web technologies are the same. Then the training videos cover the relevant object-oriented programming (OOPS) concepts, programming logic and Java coding. These programming skills give the confidence to build the automated Selenium test scripts (or test scripts in any other tool) in real life. Then the training videos cover Selenium WebDriver code in detail, with data parametrization and page object pattern. Finally, the videos cover TestNG, which is a testing framework. All these languages, tools and technologies are covered in the videos from beginner level. The training videos are 25 hours in total. They have ample explanations of all relevant concepts and numerous practical demonstrations.

The training videos are private and there is a fee to view them. There is one month support to provide any clarifications or resolve your queries, if any, on the training material presented in the training videos. If you need access to the training videos, please email me @ isingh 30 at g mail dot com (with no spaces).

Here are the comments by few of the software testing professionals who have used these training videos to learn Selenium:
  1. Akim I enjoyed it a lot and learned a lot from your videos - specially on the java side. Once again, I greatly appreciate it.
  2. Alex I just want to say thank you for your great tutorials.
  3. Adarsh I am happy with the way you provide the training, its very easy to understand and concepts that are explained are crystal clear. Hats off to you!!!! I am enjoying learning Selenium from your training videos. I simply love the way you explain the concepts, you do it so well.
  4. Angela The training is going well thanks. Good thing with the videos is u can playback which is a great advantage. You explanations are very good and I'm sure when I get to the actual web driver it will be clear. Great foundation work.
  5. Brij Hi Inder, No questions nothing just wanted to say that I find your videos very very good and easy. In fact, no problems understanding till now i.e. firepath. It is really really easy. Thanks.
  6. Farhod I watched your videos, very easy to understand, thanks, nice job.
  7. Guillermo I finished all your videos and I learned a lot. Thank you. I will continue practicing.
  8. Jetal you are very nice tutor and i must say would like to make u my mentor too.
  9. Karthik They (the training videos) are clear and audible.
  10. Linda I have been learning your classes, so far it's good. :)
  11. Marco first of all, congratulations, you're an awesome teacher...
  12. Mike I am making good progress with the videos, so thank you. You do a great job presenting the material in a way that makes learning much easier than it would be otherwise.
  13. Niharika I have completed the training and it is really very helpful. Thanks a lot for sharing the knowledge, I am glad I took up this training.
  14. Paul cheers Inder its excellent so far, thanks for this, ur effort is awesome.
  15. Pooja everything is well understood. Great work & great stuff, should say. Also, I am practicing it everyday.
  16. Preeti I am going through the Selenium videos and its very clear and I am able to understand. So, I am very thankful for that.
  17. Renji ...The best videos for learning Selenium.
  18. Roshitha the way u teach is simply awesome.
  19. Simona You are an excellent tutor. I have been reading books and just watching your video I have learned more in a day. Your video are clean and clear.
  20. Sujeet Your training videos are awesome and very much practical in itself. I am following your concepts and its is quite helpful.
  21. Siva I found training is very useful. Thanks make it effective. Thanks for your support as always.
  22. Shwetha In one word i would say the course as "WOW". I could see that the you have put on a lot of effort in each training and have shared your knowledge extensively.
  23. Vani The videos are very informative and useful.
  24. Adarsh I did go through all the video sessions that you shared. It was a good learning experience. Infact, I am new to Java and that postponed me to learn webdriver. Your training sessions is helping me to understand on the concepts.
Please see these example Selenium training videos:
Selenium IDE
Selenium WebDriver
Selenium Interview Questions and Answers  

Wednesday, October 2, 2013

JMeter Web Performance Testing Training Videos

You can get trained in web performance testing with JMeter by using our training videos. These high definition videos are 13 hours long altogether. They cover many aspects of performance testing - performance testing process, using JMeter effectively, setup and execution of performance tests, analysis of results and much more.

Friday, September 27, 2013

No Time to Test

There was a thought-provoking discussion in the Software Testing Space LinkedIn group this month. The problem posed by Amit (many thanks for raising an important practical problem) was thus.

Problem One is the only QA engineer for a large team of developers. The rate at which the developers build new features is far greater than the rate at which the QA engineer can test them. How would one ensure high quality is maintained in the application?

Here are the solutions to this common problem that were proposed by the expert group members:
  1. Involve the developers in the team for some testing.
  2. At first, test the high business priority features and then the high-risk features. Perform a regression test whenever time permits.
  3. Prioritize all features to be tested. Test the new features and important bug fixes first.
  4. Raise the problem to the team highlighting the limited test coverage due to lack of time. Make sure that the team understands and accepts the risk.
  5. Use test automation to automate sanity test and regression test cases. Build the test automation framework so that developers can easily build automated test scripts.
  6. Merge test cases or write workflow-based test cases that allow more coverage and take less effort to write and execute.
  7. Use Requirement and Risk based testing approach by defining the testing scope based on priority, impact and timelines.
Overall, the members agreed on the best solutions as no. 4 and no. 1 and 5. Michael neatly summarized the solution. Many thanks, Michael.

Solution Ensure that the team is aware of the limitations of time and resources for testing new features and bug fixes and regression testing. The team needs to understand the risk due to these limitations. Always do your best. Ask and accept help from any team member with your testing tasks.

Sunday, August 18, 2013

JMeter Web Performance Testing Training Course

I have launched this course in web performance testing using the leading open source free tool, Apache JMeter. As you may know, I have a number of years experience in delivering performance testing and load testing projects successfully. I started this course on repeatedly finding even experienced software testing professionals having many gaps in their knowledge of performance testing and load testing. This course has 13+ hours of online training videos with lots of example performance test plans. The topics taught in this course include performance testing concepts, JMeter installation and using the UI effectively, using Proxy Server, building requests, Thread groups, Logic controllers, Samplers, Listeners and statistical results, data parametrization, test script and test plan modeling, server technologies, profilers and many more.  In order to get started, please see my demo videos

JMeter short tutorial

JMeter detailed tutorial

You can see more details of these training videos at JMeter Web Performance Testing Training Videos.

Tuesday, August 6, 2013

Performance Test Reports - JMeter Listeners Tutorial

I run a training course on Apache JMeter called Web Performance Testing with JMeter. One of the important concepts in JMeter is Listeners and that I want to share with you. Reports are called Listeners in JMeter vocabulary. Listeners are used to collect the performance test results and display it to the performance tester. Now, let us learn about Listeners in JMeter and how to use them. You can see listeners working in my short JMeter video.

Listeners are used to collect and display performance test results. But there are many types of Listeners. One of my favorites is View Results in Table. It is a simple Listener that shows data about each response. Here is what it looks like.

In the above Listener, the Sample Time (ms) indicates the Response Time, the Status indicates if the request was successful (green means yes, orange means no), the Bytes indicate the size of the response and the Latency indicates the Latency Time. Of course, you can copy the test results to Microsoft Excel and format them further. But, there is an easier option. You can have JMeter save the test results to a CSV file or XML file. Further, you can even specify which fields you want to save by clicking the Configure button. JMeter can also summarize the test results automatically for you. For this, you can use Summary Report. Here is what it looks like. It summarizes the results for each request. 

JMeter has Listeners that automatically show the test results graphically. There are several like Spline Visualizer and Distribution Graph but my favorite is Graph Results. Here is what it looks like. It shows the Average and Median Response Time and the Throughput.

Some other points to note are:
1. All Listeners have access to the same test results. Only their display is different.
2. As with other test elements, Listeners work according to their scope. This means that if you put a Listener under the Test Plan, it will capture and show all the test results. If you put the Listener a request, it will capture and show test results of that request only.
3. In a particular scope, Listeners are last in execution order because they need all the results as input.
4. Listeners use substantial CPU and RAM resources on the computer. In order to avoid the Listeners becoming a bottleneck, you should decide the best Listener for your purpose and put just that Listener in your Test Plan.

Overall, JMeter Listeners are basic but configurable and very simple to use. You can save effort on test results reporting by using these available Listeners.

Sunday, June 9, 2013

VBScript Questions and Answers

VBScript is a scripting language used to create test automation in tools such as UFT and TestComplete. In addition, it is used to automate user tasks on Windows computers. Learn VBScript in detail using my free VBScript video tutorials. Then attempt the below quiz on VBScript.
Each question in this quiz has four options with one best answer. The score is updated at the bottom left as you answer each question. Try it.

1. Which browser has built-in support for executing VBScript?
Internet Explorer
Mozilla Firefox
None of these

2. Which statement is true for VBScript names e.g. variable names or procedure names?
They are case sensitive.
They are case insensitive.
They are case insensitive but should be written consistently for readability.
Only variable names are case insensitive.

3. What is the datatype of a variable in VBScript?
It is the datatype specified when that variable is declared.
None of the above

4. What is the difference between the Sub procedure and Function procedure?
Only the Sub procedure can perform actions
Both procedures can take arguments
Only the Function procedure can return a value
All of the above

5. In the Select Case statement, which case is used for unknown cases?

6. Which loop is used to iterate till a condition becomes true?
For Next loop
For Each Next loop
Do While loop
Do Until loop

7. What is the purpose of the Set keyword in VBScript?
Assign a value to any variable
Assign a value to an object variable
Declare an array
Configure the VBScript program

8. Which VBScript function returns the day of the week for any date?

9. Which VBScript function converts an input string to all lowercase?
There is no such function to directly convert to lowercase.

10. Which VBScript function can compare two strings?

Score is 0/ 10.
Mention your scores in the comments below.

Monday, May 27, 2013

Checkpoints in Automation Testing

In the last two articles, we saw how to create keyword tests and script tests in TestComplete. In this article, we will learn the checkpoints available in TestComplete. First, what is a checkpoint? A checkpoint is an automated comparison that you can have within an automated test. When the test is run, the checkpoint compares the value stored in the test (i.e. the baseline value) with the actual value and reports success or failure depending on the comparison. A single checkpoint replaces a number of test steps or script statements that perform the same comparison. There are more than 10 checkpoints available in TestComplete. Let us visit them one by one.

Tuesday, April 30, 2013

Script test in TestComplete

In the last post, we learned how to create a keyword test in TestComplete. I had mentioned then that Script tests are more suitable for people who know a scripting language like VBScript or JScript and who have written test automation before. In this post, let us see how to build a script test to test the Windows Calculator. We will use data parametrization, external data sources, conditional statements and loops. Rest assured that it will not be simple at all.

Friday, April 26, 2013

How to create a keyword test in TestComplete (from SmartBear Software)?

TestComplete is a test automation tool that can test a variety of applications like Windows applications, web applications, web services, Adobe AIR applications and Java applications. Tests can be created as either Keyword tests or Scripts. The former are more suitable for beginners in test automation and the latter are more suitable for people who know a scripting language like VBScript or JScript and who have written test automation. It is very simple to build a keyword test in TestComplete. In this post, let us see how to build a keyword test in a browser based application quickly.

Friday, April 19, 2013

How to send an email using VBScript?

In the last article, we have learnt that VBScript is useful to write small automation utilities like writing commands in cmd.exe, launching an executable, killing all instances of an executable etc. But do you remember a forwarded email that contained an attachment file and sender asked you to save that file with .vbs extension and then to double click that file to see some magic? If you do perform those steps, a program automatically executes, open a new email message, write recipient email address in "To" field, write some silly text in body and then sends that mail using your Outlook. By the time you understand something and react, an email shoots to recipient. Actually that attachment could be a VBScript. We will learn how such a script works.
If you want to learn VBScript from basics to some advanced topics, use my free VBScript tutorial for beginners.
First we have to create an object of Outlook.Application class (This only works if you have Outlook configured with an email address in your machine) and then create an object of mail item. The code snippet follows. Note that all the source code is in italics font.

   Set objOutlook = CreateObject("Outlook.Application")
   Set objMail = objOutlook.CreateItem(0)

To see the email message, use .Display method, otherwise processing will be happen in background.
   objMail.Display   'To display message

Now fill Recipient email id, Copy email id, Subject and Body, using following commands: = "" = ""
   objMail.Subject = "Mail Subject"
   objMail.Body = "This is Email Body"

To add attachments, one can use following command (Repeat similar command to add more attachments):

Now email is ready, now use .Send method to send your message to recipient:

Now open notepad and integrate all these to see how it works. Below is the complete script to send email message (I intentionally commented the objMail.Send line below, so you are not surprised. If you want to actually send the mail, just uncomment objMail.Send line):

   Set objOutlook = CreateObject("Outlook.Application")
   Set objMail = objOutlook.CreateItem(0)
   objMail.Display   'To display message
   objMail.To = "" = ""
   objMail.Subject = "Test Mail Subject"
   objMail.Body = "This is Email Body"
   'objMail.Attachments.Add("C:\Attachment\abc.jpg")   'Make sure attachment exists at given path. Then uncomment this line.
   'objMail.Send   'I intentionally commented this line
   Set objMail = Nothing
   Set objOutlook = Nothing
Save notepad file as .vbs extension. Double click .vbs file to execute VBScript.

To send a mail to multiple recipients, use following commands instead of objMail.To line:

Below is the complete script is to send mail to multiple recipients (I intentionally commented the objMail.Send line below, so you are not surprised. If you want to actually send the email, just uncomment objMail.Send line). Write below code in a notepad file, save it as .vbs extension and then double click to execute script.

   Set objOutlook = CreateObject("Outlook.Application")
   Set objMail = objOutlook.CreateItem(0)
   objMail.Display   'To display message
   objMail.Recipients.Add ("")
   objMail.Recipients.Add ("")
   objMail.Recipients.Add ("")
   objMail.Subject = "Mail Subject"
   objMail.Body = "This is Email Body"
   'objMail.Attachments.Add("C:\Attachment\abc.jpg")   'Make sure attachment exists at given path. Then uncomment this line.
   'objMail.Send   'I intentionally commented this line
   Set objMail = Nothing
   Set objOutlook = Nothing

Please provide your feedback. Thanks!

Note: This article has been contributed by Vinod Joshi, who is a test automation professional. Vinod is a respected test automation designer. He is very active in the software testing space community. Additionally, Vinod is the moderator of the Software Testing Space group in LinkedIn.

Want to learn VBScript in detail? Use my free VBScript tutorials. Thank you.

Thursday, April 4, 2013

How to work the Command Window using VBScript?

VBScript is ActiveX-enabled scripting language developed by Microsoft that connects to scripting hosts like Internet Explorer and performs functions locally using the Windows Script Host (WSH). It is an interpreted client side language. VBScript uses the Component Object Model (COM) to access elements of the environment within which it is running. Generally, scripting languages are coded faster as these are interpreted. VBScript is structured and used with smaller programs with limited capability. It is embedded within windows by default in every desktop release since Windows 98. 

A VBScript script must be executed within a host environment, of which there are several provided with Microsoft Windows, including Windows Script Host (WSH), Internet Explorer (IE), and Internet Information Services (IIS). Additionally, the VBScript hosting environment is embeddable in other programs, through technologies such as the Microsoft Script Control (msscript.ocx). VBScript allows us to write small automation utilities and to execute them without using any functional automation tool. We will now learn how to work with command mode.

Sunday, March 31, 2013

Selenium RC Quiz Part 3

Selenium is a popular open source test automation tool for web applications that is used for functional and cross-browser compatibility testing. You may have already attempted the Selenium Quiz Part 1 and 2. If not, try those first. Now, attempt the part 3 of this quiz to check your familiarity with Selenium RC (also known as Selenium 1). Selenium RC is the original Selenium tool. RC has the Selenium Server that controls the browsers and Client Libraries for the supported programming languages (Java, Ruby, Python, Perl, PHP or .Net). Each question in this quiz has four options with one best answer. The score appears at the bottom left. A score of 5 or less indicates low knowledge; 6 to 7 means a fair level of knowledge and 8 and above shows a good knowledge of Selenium RC.
Instead of this quiz, you may want to see my video on Selenium Questions and Answers where I have compiled all these questions.

1. What are the different modes that Selenium uses?
*firefox and *iexplore
All of the above

2. How do you start the browser?
get start()
selenium.server start()
None of the above

3. Do you need to have Selenium .jar files as a dependency of your tests?
Yes, but as a good practice only
No Selenium jar file is provided with Selenium RC.

4. How many parameters does the Selenium object take when using DefaultSelenium?

5. How do you start selenium rc server with user extensions?
java -jar selenium-server.jar
java -jar selenium-server.jar -userExtensions user-extensions.js
java -jar selenium-server.jar user-extensions.js
java -jar selenium-server.jar user-extensions.js -h

6. Which Selenium command do you use to run commands in slow motion in Selenium RC?
None of the above

7. Which command is used to get the alert box?

8. Which command is used for verifying if a web element exists?
selenium.isElementPresent(String locator)
None of the above

9. Which command is used for typing in a textbox?
selenium.type(String locator, String value)

10. What is the command to load a page?
selenium.waitForPageToLoad(String timeoutInMilliseconds)
selenium.waitForPageToLoadInt timeoutInMilliseconds
Score is 0/ 10.

I have written the JavaScript source code that runs the quiz. The questions and answers of this quiz have been contributed by Varsha Tomar.

Please remember to mention your scores in the comments below. Now answer the quiz on Selenium WebDriver (also known as Selenium 2).

Friday, March 15, 2013

Apache JMeter: How to build and run a web test?

JMeter is a popular open source load testing tool that is written in the Java programming language. Besides other things, JMeter can be used to load test web applications. It is very simple to deploy JMeter on a Windows computer. JMeter is full of features to build, configure and run a realistic web test. It can also be used to perform functional testing on a web application. With this introduction, let us see how we can quickly build and execute a web test in Apache JMeter.

If you are new to performance testing or JMeter, please see my video, JMeter Load Testing Beginner tutorial. I have explained performance testing in the first 40 minutes. In the next 40 minutes, I have demonstrated the important basic JMeter features.

Also, you can see a complete JMeter load test explained in my video, Learn JMeter Load Testing in 18 minutes.

The latest release of JMeter can be downloaded here. At this time, the latest version is 2.9. JMeter requires Java 6 or later (meaning that the client computer needs to have Java version 1.6.x or later). You can check the java version on your computer by running the command, java -version in the command prompt window. If it tells you the correct Java version, you can proceed to set the JAVA_HOME environment variable under Control Panel> System > Advanced System Settings > Environment Variables > User variables. The JMeter binary comes as a zip file that you need to extract in a folder in your computer. Under this folder, there will be a folder called bin. You can launch JMeter by executing jmeter.bat file in the bin folder.

Building the web test plan
We will now build a simple web test. This test will involve navigating to the Software Testing Space blog and then my profile page. Add a Thread Group by right-clicking on the Test Plan node and then clicking Add > Threads(Users) > Thread Group. Leave every value as default.
Now, add a HTTP Request by right-clicking Thread Group and clicking Add > Sampler >  HTTP Request. Change the Name value to HomePage. Put the Server Name or IP value to Then scroll to the bottom and check Retrieve All Embedded Resources from HTML files. Add another HTTP Request. Change the Name value to ProfilePage. Put the Server Name or IP value to Put the Path value as profile/05923580987480854491.

Running the web test plan
Before running the web test, you need to arrange to get the results. For this, add a listener. A simple listener is View Results in Table. Add it by right-clicking on Thread Group and then clicking Add > Listener > View Results in Table. Now click the green Start button or in the menu, click Run > Start. If you have not saved your web test plan, you can do so now. You should see the results. Results containing green icons indicate success, those containing orange/ red icons indicate warnings or errors. If your results contain green icons, it means that you successfully ran the web test plan with 1 thread (meaning an independent virtual user) running each HTTP Request once.
Now, run the same web test plan with 2 users running 3 iterations of 2 HTTP requests. Important: Please note that this blog is not a web site to be stressed. This is only an example. Therefore, please be reasonable and use very small numbers. Change the Thread Group values. Put Number of Threads (Users) as 2. Put Loop Count as 3.
Click on View Results in Table. Then click the Clear button in the toolbar to clear the previous results. Run the web test plan by clicking the Start button. When the test plan is running, you should see 2/2 in the upper right corner. This means that 2 threads/ users out of a total of 2 are active. Once the requests are sent and responses received, you should get the new results.

As you can see, it is quite easy to build and run simple web tests in JMeter. I hope that this post was able to raise your interest in using JMeter. You can see a more complex and complete JMeter load test plan in my video, JMeter Load Testing.

Tuesday, March 5, 2013

Selenium IDE Quiz Part 2

As you know, Selenium is a popular open source test automation tool for web applications that is used for functional and cross-browser compatibility testing. You may have already attempted the Selenium IDE Quiz Part 1. If not, try that first. Now, attempt the part 2 of this quiz to check your familiarity with Selenium IDE. Some of the answer choices are quite similar so please read each answer carefully before selecting the best one. The score appears at the bottom. A score of 5 or less indicates low knowledge, 6 to 7 means a fair level of knowledge and 8 and above shows a good knowledge of the Selenium IDE.
Instead of this quiz, you may want to see my video on Selenium Questions and Answers where I have compiled all these questions.

Friday, March 1, 2013

Selenium IDE Quiz Part 1

Selenium is a popular open source test automation tool for web applications. It is used for functional and cross-browser compatibility testing. In addition, several other open source functional testing tools are based on Selenium. This quiz on Selenium IDE is the first part of my series on testing using Selenium. Attempt this quiz to check your familiarity with Selenium IDE. Each question has one best answer. The score appears at the bottom. A score of 5 or less indicates low knowledge, 6 to 7 means a fair level of knowledge and 8 and above shows a good knowledge of the Selenium IDE. Instead of this quiz, you may want to see my video on Selenium Questions and Answers where I have compiled all these questions. 
Note: You can learn Selenium WebDriver from my complete set of Selenium Python tutorials for Beginners.

Monday, February 25, 2013

How to keep your passwords secure?

Password security is an important part of security of computer systems against unauthorized internal or external access. Therefore, let us consider this topic. Now, what is a password? A password is a string of characters that you give to verify that you are you when you log on to a computer system. In other words, a password is used to authenticate you to a computer system. We will see tips to create a secure password. Next, we will see guidelines for application developers to implement good password security. But first, let us see the different types of passwords.

Saturday, February 23, 2013

Java Questions and Answers Part 2

As you know, Java is one of most popular object-oriented programming languages and has been in use since its release. It is interesting that test automation can be written in Java in certain automated testing tools/ frameworks. View the videos, Java Interview Questions and Answers - 1 and Java Interview Questions and Answers - 2. Or read on.

1. How can you add GUI elements to a Java application?
Java has an API called swing to provide GUI components such as textboxes, checkboxes, radiobuttons, comboboxes and so on. These components are available on importing javax.swing.*. The process to add a GUI element to a Java application involves creating a new object of the component class, adding the object to the container and attaching an event handler to the object.

2. How can you accept user input to a Java application?
This can be done by importing the java.util.Scanner class. The Scanner class has methods like nextInt, nextDouble, nextLine and so on to accept inputs of different data types from the user into a variable.

3. What methods are available to search within a string?
The String class in Java has a vast number of methods. There are many methods to search for characters within a string. Some of these methods include charAt, contains, indexOf, lastIndexOf, startsWith and endsWith.

4. How do you draw graphics in an application?
Java has a built-in Graphics object. This object has methods such as drawArc, drawImage, drawLine, drawRect (empty rectangle)/ fillRect (solid rectangle), drawPolygon/ fillPolygon and so on that can be invoked to draw the respective lines and shapes in any desired color.

5. How can you work with files and folders?
First, import the library. Then create an object of the File class and point it to the required file or directory. This object will have the file's properties (e.g. length, isDirectory, lastModified) and methods (e.g. listFiles, createNewFile, getPath). A Scanner object can be created for the File object and used to fetch the contents in the file.

6. How do you handle exceptions?
There may be code which if executed may throw an exception. Such code is put inside a try block, which is followed by a catch block containing the exception handler. If the code throws an exception when it is executed, the control flows to the catch block. The try block may have one or more lines of code. Each line of code may have its own try block. There can be one or more catch blocks to handle different types of exceptions. All such catch blocks immediately follow the try block.

7. What is recursion?
A recursive method is one that calls itself. See the example below. For a given integer input that is greater than one, this method sums all integers from the input down to one. This method has the base case for input equal to one. The recursion exists where sumAll method calls itself in the last line.
public static int sumAll(int n){
    if (n==1)
        return 1;
        return n + sumAll(n-1);}// recursion is in this line of code

8. What is the benefit of using a List instead of an array?
The Collections class has several useful methods that work on a List but not on an array. Examples of these methods are addAll, binarySearch, copy, fill, max, min, reverse, shuffle and sort.

9. What is the difference between Stack and PriorityQueue classes?
A new element can be added to the Stack by the push method. The new element is always added at the top of the Stack. In an existing Stack, the top element can be removed by the pop method. The Stack has other methods to add and remove elements at specified positions within the Stack.
In a PriorityQueue, a new element is added by the offer method. This new element is always inserted at the bottom of the queue. In an existing queue, the top element can be removed by using the poll method. The queue does not have methods to add and remove elements at specified positions within the queue.

10. How can different code in a program be executed concurrently?
This can be done using threads. A Java application can have multiple threads of execution running at the same time. A thread can be created by writing a class that implements the Runnable interface which means implementing the run method. Thereafter, a new thread can be created by instantiating a new Thread passing the new object of this class as parameter. A Thread object has a number of methods like setPriority and start.

Tuesday, February 12, 2013

Java Questions and Answers Part 1

As you would know, Java is one of the most popular object-oriented programming languages and has been in use since its release in 1995. What is particularly interesting is that test automation can be written in Java in certain automated testing tools/ frameworks. Here are some basic questions and answers related to the Java programming language. These questions and answers are excerpted from the notes that I created. View the videos, Java Interview Questions and Answers - 1

and Java Interview Questions and Answers - 2. Or read on.

Wednesday, February 6, 2013

Software Configuration Management (SCM) confusing terms explained

SCM involves controlling access and storing changes to software code, resources and project artifacts. Your software project most likely has a chosen SCM tool (a.k.a. version control software or revision control software). However, SCM tools often use similar terms to mean very different concepts. Make sure you understand the difference between the following terms by reading the guest article that I have written here.
  • Repository versus Project
  • Trunk versus Branch
  • Add versus Update versus Commit
  • Delete versus Purge
  • Checkout versus Lock
  • Overwrite versus Merge
  • Revision Number versus Message
  • Label versus Baseline

Monday, February 4, 2013

JavaScript Quiz Part 2 (final part)

As you may know, JavaScript is the default scripting language of the browser. In addition, much test automation is also written in JavaScript. If you have not attempted the Part 1 of this Quiz, do that first. Then attempt this part of the quiz to find out how well you know JavaScript. If you can answer 8 or more questions correctly in each part, then you are a JavaScript expert :)

Friday, February 1, 2013

How to use application metadata for software test automation?

Metadata is commonly understood as data that describes data. An example of metadata is the product catalog of a company. Such a catalog contains additionally assigned attributes (i.e. related but extrinsic attributes) such as name, model, price and availability of products. Another example of metadata is the data within a meta tag of a web page. This metadata includes the description of the web page and keywords. This metadata is not used to generate the web page content but is used by search engines. Still another example of metadata is the details of a digital image such as title, width, height, resolution, camera used and so on. This metadata is used to search the image in an image library and also to modify the image as desired. In the same way, a deployed software application build has metadata.

Software test automation needs certain application metadata in order to execute. Such metadata data is perhaps the application URL or path to the executable file, valid users' credentials (user names and passwords) and their privilege levels, internal name of the application, application version, components released in the build, server addresses, application database name and application database user credentials. It is common for such data and more to be available in the application build release notes. It is also common for the release notes to be created using standard markups like HTML or XML. Now, if test automation is aware of the schema used in the release notes (i.e. which tag contains which data), it can query the release notes and extract the required data. Test automation can also store this data in the test database. This provides readily available data to run manual tests and also to generate test run reports. Auto population of application metadata in the database works well with automated software build systems which create regular application builds and the corresponding release notes. In such a case, test automation can wait for some notification or keep polling the network location for a new build. Whenever the new build is available, it can auto populate the application metadata and launch the build sanity test (or any other test per the automated test plan).

Until next time.

Image courtesy of fotographic1980 /

Monday, January 28, 2013

HTML (HyperText Markup Language) Quiz

HTML5 is the upcoming HTML standard. It introduces a number of new features like built-in video support, geolocation, drawing and so on. It also integrates XHTML, CSS and JavaScript. Check your awareness of HTML5 with this short quiz which is created using HTML5. Each question has one best answer. Your score will always be visible in the bottom left. Please use the latest version of an A-class browser like Chrome, Firefox or Internet Explorer to view this post. The latest versions of these browsers already implement a lot of HTML5 features.

Wednesday, January 23, 2013

Software Testing Effort Estimation: Questions and Answers

Software test effort estimation is a key skill required of a Test Manager (for multiple projects), a Test Lead (for the activities of the testing team) or a Tester (for own activities). In this post, I will not explain what software test effort estimation is or how to do it. If you need to know these things, view my video on Test Estimation techniques, formula example and Questions and Answers

In this post, I will pose relevant questions regarding effort estimation in software testing. These questions are useful to guide yourself when you do estimation. They help clarify thoughts during discussions among project stakeholders. Also, these questions are useful in interviews for various testing positions. I have also discussed these questions and their answers in the above video on Test Effort Estimation.

Now, you may know that once the effort estimates are agreed, there is a (sometimes unsaid) expectation of commitment to these estimates. Therefore, generating a fair effort estimate in software testing is a serious task. Get the effort estimate loose and the resources and time would be under-utilized. Get the effort estimate too tight and there is a risk of stressing the resources and, in extreme cases, even failure to meet project deadlines. With this in mind, let us see the questions.

1. What data would you gather and analyze before starting test effort estimation?
I would need the scope of work (i.e. the size of the system, types of testing required, test strategy, planned test cycles, "non-test" activities e.g. test data generation, defect logging and tracking, triage meetings etc.). The scope of work is better defined in a Work Breakdown Structure (WBS) for the project. Also I would need historical data of similar projects (as similar as possible in size, development life cycle, technology and team composition). This history data may be available in the company records or can be gathered from the team who worked in the similar project.
It is quite possible, in fact common, for some of the above data to be not available. But in any case, the scope of the work should be defined and agreed by the stakeholders (i.e. the client/ business, management and the project team) before test effort estimation is done.

2. What approach would you use to create a test effort estimate?
There are several approaches that can I can use for test effort estimation. It depends on the available data and the time in hand to generate the estimates (which, in turn, may or may not affect the accuracy of the estimates). Some of the common effort estimation approaches include the using the software size, using the WBS (include "non-test" activities in the WBS, if missing), use project history data or if available, use the company's estimation software and estimation models. If (some of) the above data is not available, I could use my expert judgment (or judgment of more than one person). It is better to use at least two approaches. This way, I can see and address any obvious problems in the effort estimate.

3. Which approach would you prefer if the test effort estimates are needed quickly?
There may be business situations requiring estimates to be generated quickly. In such a case, I would prefer estimating activities at a summary/ group level. Then use another estimation approach to know if the estimates seem okay. Further, I would add some buffer, of say 5%, of overall effort, to use just in case there are unforeseen tasks to perform in the test.

4. Which approach would you use to get accurate test effort estimates (for example, as required by a services company to quote in a fixed bid project)?
If possible, I would like to use the bottom-up approach for creating effort estimates for all tasks in the WBS. The individual effort estimates roll up to give the effort estimates for each group task. In order to refine the effort estimates further, some work items may be sampled and then executed. The actual effort spent on performing these work items can be used to improve the effort estimates.

5. What is the two-estimate approach?
It is possible that the client has a fixed budget for which they can be billed. Internally, the contracting person or company may have reasons to work more hours than for which they bill the client. In such a case, the effort estimates with the client and the contracting person/ company would be different.

6. What data would you analyze to confirm or revise your test effort estimate?
I would gather and analyze the actual time data logged by the team members against project tasks. It's quite possible that the team spends more or less time than estimated on individual project tasks. The reasons for doing so should be understood so that effort estimates of similar tasks yet to be performed can be refined, if required.

7. Is any supporting data required with your test effort estimate?
It is not possible to get buy-in for an effort estimate without giving the estimation approach used. Therefore, I would outline the effort estimation approaches used to generate and support the estimates. Further, I would provide the assumptions used while creating the estimates.

8. What risks do you see to render a test effort estimate inaccurate?
There are an infinite number of risks that could throw an effort estimate off. But the important risks include scope risks (e.g. important activities missed in estimation, feature creep, last minute system changes), resource risks (e.g. resource not committed to the project or not productive), quality risks (e.g. build rejects) and technical risks (e.g. test environment not available, test deliverables not accepted).
Despite risk mitigation measures in the testing risk management plan, if a particular risk turns true it should be communicated to the project stakeholders. It is possible that someone within the team or outside it has a solution to this issue. If there is no solution, the team has to absorb the risk impact.

9. When would you revise the test effort estimates?
I would revise the estimates Whenever there are material changes in the project. Examples of such changes are scope changes (e.g. new features added to the system under test, new types of testing like load testing needed) and resource changes (e.g. team member replaced in the team).

10. How do you improve your estimation skills?
Like other skills, practice makes perfect. Comparing effort estimate data and actual effort data leads to continuous improvement. A big opportunity for improvement is project reviews (gate/ phase-end reviews and project completion reviews). Lastly, my estimation skills improve with doing estimation on more and more projects.

Image courtesy of imagerymajestic /