Top 6 solutions for software testing failures

The cost of software testing is still not valued by its worth. Although it is a critical investment companies avoid spending on testing because they don’t realize the ROI on testing and/or a quantifiable cost of quality. The most common complaints against testing that we repeatedly hear are:

  • It is a necessary evil that stalls a project the closer it gets to a release
  • It is too costly, time consuming without any guaranteed outcome
  • Many a times regression testing is not effective to identify new defects

Having worked on a number of testing projects over the past 12 years, I realize why there is a high tendency to look at testing with such a skeptical eye. I would like to share what we have learnt over time.The top six points in our view to improve the effectiveness of manual testing are:

6. Reducing effort and time in Test Documentation

A lot of teams spend unnecessary time detailing test scenarios during the planning phase which are rarely referred to after 2-3 rounds of testing. This increases maintenance overheads and reduces flexibility and coverage in the long run thus resulting in inefficient testing. Post the initial 6-8 months a large % of test scenarios are outdated and require the same effort in updating. Instead of detailing each and every step for every test scenario, one can cover it with test conditions and the expected results.

5. Focusing on breadth and depth of testing

Many a times when execution is not prioritized the depth of testing takes lead over breadth. By aiming at covering more breadth, we align testing with the business objectives. By doing this the teams aim at being effective first and then efficient. Breadth referring to covering positive  critical cases (across the application) that are frequently used by end user.Depth referring to covering all the test cases for a module.

4. Testing, a continuous activity

Many companies look at testing as a one-time investment. They outsource/ execute in-house once during the start of the development of the product and then rarely test it during the maintenance phases. The primary reason is invariably budget driven and goes onto harm the quality of the product when not tested after newer versions. For every minor release one should ensure all the regression test cases are executed and for every major release all the high and medium priority test cases are executed at least once.

3Remembering the objective of testing

The key objective of testing is to break the system and not to prove that the system works as per the requirements.This has a direct impact and can improve testing effectiveness and the number of defects one will find. It is often observed that many senior testers habitually start proving that system is working as per the requirements which is against the primary objective of testing.

2Strategize Test optimization

Coverage is important but not at cost of redundant test cases. Test optimization is an intelligent way to ensure test coverage in less time. That’s why testing teams need to collaborate more with the development teams. Understanding the high level design and structure of the application makes testing more effective. In development, one of the main principles followed is reuse. So, we can use the same principle while testing the same code which is reused. Why not optimize and test the class/object once and just test the implementation of the class/object on other screens/modules. If the test cases are reusable maintainable and scalable it is an additional advantage to roll out in time and under budget.

1. Focusing on the Business for which you are testing

Testing cannot be done in isolation. Business priorities and challenges are equally and in most of the cases more important than testing needs. One thing I have learnt is that testing cannot drive business decisions, business drives testing most of the times. Aligning testing to the business requirements results in a disciplined and ready to market high quality product.

These are some of the solutions with which I could overcome testing failures. Do share yours if you have new solutions or methods

Mukesh Mulchandani | CTO | ZenTest Labs

Common Issues and Solutions in Selenium

Selenium is fast becoming one of the most widely used test automation tools for web based applications. While working on selenium projects we faced some common issues that I thought is best addressed through the solutions I am listing below. In case you have tried other solutions and they have worked for you, please feel free to add your inputs in the comments box.

Issue No. 1. Issue in handling popup windows / Frame
Solution: Pop-ups that are very commonly found on the GUI of web apps are many times not recorded by selenium or cause issues while running selenium scripts. The table below gives a snapshot at how these issues can be handled

Popup Type Description Solution
Alert Popup (Message box) Message box popup on application To handle alert popup you can use getAlert functions e.g. selenium.GetAlert();
This will click on Ok button of alert and return alert message.
Confirmation Popup This type of popup has Ok & Cancel buttons You can select the button you want to click, by using below statements before GetConfirmation
For Ok – chooseOkOnNextConfirmation
For Cancel – chooseCancelOnNextConfirmation
And then use GetConfirmation as follows,
selenium.GetConfirmation();
This will click on selected button & return confirmation message.
Popup Window/ Frame In this type of popup, the Frame/window contains data fields where we have to fill values in fields. this can be done using SelectFrame
Following code will illustrate how this can be done.

selenium.Click(btnSubmit)
// This will open a popup window asking user to enter activation code & click on confirm button
selenium.SelectFrame(frmActivationCode); // this will transfer the control to Activation code frame i.e. popup window
//Now you can process objects from popup frame
selenium.Type(txtactivationCode, stractivecode);
selenium.Click(btnConfirm);
// After this you have to get back the control to parent window again using
selenium.SelectWindow(“”);

Issue No.2. Selenium does not trigger event on changing values
Solution: Selenium does not trigger event on changing values so we have to explicitly trigger the event using fireEvent,

selenium.FireEvent(cmbCategory, “onchange”);
Here, cmbCategory is object on which you want to fire event & onchange is the name of event.

Issue No.3. Synchronization issue leading to timeout
Solution:
For this type of scenario I created a function ‘CheckElementPresent’ which will take object locator as parameter & will return true once object is visible.

CheckElementPresent(btnSubmit)
Here, I have used selenium.IsElementPresent(locator) to verify object is present in for loop with Thread.Sleep

Issue No.4. Handling SSL certificates
Solution: Many times we face issue in SSL certificates for selenium tests. We can handle this issue by using –trustAllSSLCertificates & firefox profiles as shown below,
a. For browser other than firefox
Use following command to start selenium server, this will start selenium server which trust all SSL certificates.
C: > java -jar c:\Selenium\selenium-server2.14.0.jar. –trustAllSSLCertificates
b. For Firefox browser
Create a new firefox profile (steps to create profile – http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles)
And accept SSL Certificate using same profile. Now, use the same profile while running selenium server using following command,

C:> java -jar c:\Selenium\selenium-server2.14.0.jar. -firefoxProfileTemplate /C:\Selenium\ Profile

Here were some issues that I faced and the solutions I came up with. Please share any other solutions you know of for the above issues. Also please share other issues that you faced and if possible provide the solutions that you came up with. Happy testing! 

Hemant Jadhav | Senior Consultant | ZenTest Labs