What is your Quality Philosophy?

I recently went to a Tester Gathering where this question was brought up. There were many answers to it. Some of these were:

  • Software should be stable.
  • The software does what it’s supposed to do from a functional perspective.
  • To deliver defect free code as best possible, accounting for schedule, risk and resources.
  • Quality software is reasonably bug-free, delivered on time and within budget, meets requirements and is maintainable.
  • To deliver what is needed, in a quality that is accepted by the client.
  • Test early and test often

This turned out to be a very controversial topic and we had a very good debate about it. We talked about Six Sigma, Total Quality Management and even discussed Deming’s 14 Point Philosophy ( I recommend reading his work, more on him can be found here. A brief introduction is below).

Dr. W. Edwards Deming was a statistician who went to Japan to help with the census after World War II. Deming also taught statistical process control to leaders of prominent Japanese businesses. His message was this: By improving quality, companies will decrease expenses as well as increase productivity and market share. After applying Deming’s techniques, Japanese businesses like Toyota, Fuji, and Sony saw great success. Their quality was far superior to that of their global competitors, and their costs were lower. The demand for Japanese products soared – and by the 1970s, many of these companies dominated the global market.

I used to often ask this question when conducting interviews. My purpose for asking this question was to know how the candidate thinks. I often had candidates recite texts memorised from books which lead me to ask clarifying questions to satisfy my curiosity.  Many used to get caught out as they did not think about the answers and just memorised some text. This allowed me to initially separate good candidates from the average ones.

Quality philosophy is also dictated by the circumstances. Sure there are basic ideas of what quality means but if you’re looking for a quality philosophy, then it also depends on the domain, the company management, the company culture, the teams and the project.  It can also include quality in:

  • How a project is planned, designed, implemented and reviewed.
  • Reporting statuses among departments and department heads.
  • How requirements are written so Developers can produce the design with ease
  • Documentation Standards
  • Testing
  • Release Management etc.

Churchill said: “They say no one is perfect. Than they say that practice makes perfect. I wish they made up their damn mind!”

Talking about perfection or getting things absolutely right – As much as we would like our software to be perfect, it is a futile attempt to make it so. There comes a point where the time and expense to make a program perfect gives diminishing returns. In my experience so far, it is impossible to deliver ‘perfect quality’. There is always this or that little bit that could be improved, simplified, re-factored or documented better etc.

I also strongly believe in the fact that the client/customer has final say over quality – if the client is satisfied, the quality is ‘ok’. If the client is happy, the quality is ‘good’. If I ask this question in an interview I expect to hear “customer” somewhere in the answer. You must seek to identify the customer, whether external or internal to the organization, then advocate for that customer with your QA skill set. The QA Engineer should be happy when they think the customer will be happy. We try to measure that “happiness” with metrics and quality gateways before release, but it is the customer feedback after release that counts. The quality of project management, documentation standards, requirements acquisition and testing, all must be in sync with the ultimate customer requirements regarding quality. The cost of producing the end result, including all interim steps, must reflect end user/customer requirements to quality.

As I said earlier, it is a very controversial question but one which has no correct answer. Like your favourite colour, or car, or your love for Justin Bieber, your quality philosophy is what makes you a unique individual. There is no “right” answer to this, but it might indicate as to what ways you think about such things.

So what is my philosophy I hear you say? Well it’s this:

  1. Know that nothing is perfect and never will be.
  2. Be a professional and passionate about what you do. Give it your best shot and try to do better every day.

This is valid whether it is about testing, development,doing business, life in general or just being human.

Webdriver Commands & Operations

 1. Opening a New page:

 driver.get(“http://www.google.com”);

WebDriver will wait until the page has fully loaded (that is, the “onload” event has fired) before returningcontrol to your test or script. It’s worth noting that if your page uses a lot of AJAX on load then WebDriver may not know when it has completely loaded. If you need to ensure such pages are fullyloaded then you can use “waits”. More on this later.

2. Locating UI Elements & Interactions with the page:

Imagine that you have an element displayed on a page with the following code

<input type=”text” name=”Password” id=”Password-ID”/>

You can find this element by using Any of the following commands:

Locate By ID:

This is the most efficient and preferred way to locate an element.

IWebElement element;

element=driver.findElement(By.id(“Password-ID”));

Locate By Name:

Find the input element with matching name attribute.

IWebElement element;

element=driver.findElement(By.name(“Password”));

Locate By XPath:

WebDriver uses a browser’s native XPath capabilities wherever possible. On browsers that don’t have native XPath support, webdriver provides its own implementation. This can lead to some unexpected behaviour unless you are aware of the differences in the various xpath engines.

 IWebElement element;

element=driver.findElement(By.xpath(“//input[@id=’Password-ID’]”));

 Locate By Class Name:

“Class” in this case refers to the attribute on the DOM element. Often in practical use there are many DOM elements with the same class name, so be very carefull when finding elements using this option. For example, lets say that you have the following html code in your browser:

<div class="cheese"><span>Cheddar</span></div><div class="cheese"><span>Brie
</span></div>

If you use the below code, it will only target the first element it finds, i.e Cheddar.

IWebElement element;

element=driver.findElement(By.ClassName(“cheese”));

But if you want to find multiple elements, you can use the command below:

IList<IWebElement> cheeses = driver.FindElements(By.ClassName("cheese"));

 Locate by Tag Name:

You can also locate an element by its DOM tag name.

For example, say you want to find an iframe which is displayed on the page with the following code:

<iframe src="..."></iframe>

The command you will need is this:

IWebElement frame = driver.FindElement(By.TagName(“iframe”));

 Locate By Link Text:

You can find an element by matching its visible text.

Say you have a link displayed with the following code.

<a href="http://www.thetrainline.com/Hotels">Hotels</a>>

The command you will need is this:

IWebElement cheese = driver.FindElement(By.LinkText(“Hotels”));

 Locate By Partial Link Text:

You can find an element by matching its partial visible text.

Say you have a link displayed with the following code.

<a href="http://www.thetrainline.com/BestFareFinder">Best Fare Finder</a>> 

The command you will need is this:

IWebElement cheese = driver.FindElement(By.LinkText(“Fare”));

When using all of the above commands to find elements, if no element can be found then a NoSuchElementException will be thrown.

3. What to do after finding an element:

So you have found an element, what would you like to do with it?

You can enter some text in the text field:

element.SendKeys(“some text”);

 Keep in mind that typing something into a text field will not clear it. Instead, what you type will be appended to what’s already there.  You can easily clear the contents of the text field or text area:

element.Clear();

You can click an element:

After finding the element using its link text or partial link text, you can click on it.

element.Click();