Tuesday, May 23, 2017

Scrum Team Roles & Responsibilities | David Tzemach

The scrum team in scrum process is a collection of individuals with cross-functional capabilities (Developers, Testers, Designers Etc.) working as a single unit to deliver the work they collectively committed to accomplishing within an iteration.

The effectiveness of a scrum team is determining by their capability to work together as a special unit (Think about an elite army unit) that follows a common goal and vision determined by the product owner, this factors are critical for any methodology but particularly in scrum process that embraces collaboration and respect among the team individuals.

תוצאת תמונה עבור ‪Scrum Team ‬‏

What should be the size of the scrum team?

Scrum teams are like any other special army unit combined with 5 to 9 resources. If there is a project that needs more resources to handle the job effort, we will add more scrum teams that coordinate together to achieve the project goals.

Characteristics of a scrum team 

These are the list of characteristics that we want to have in scrum teams: 
  • Each individual associated with the scrum team should work full time with the team.
  • The knowledge and technical skills within the scrum team are balanced.
  • Team members should follow the same rules, norms, and guidelines.
  • Motivated people that embrace the upcoming challenges.
  • Resource shouldn’t be assigned to other teams).
  • Shares experience with other team members.
  • The scrum team is self-organized.
  • Although the scrum team is built from a set of individuals, they should love to work one with each other.
  • Although the team is built from a set of individuals, they should be committed to the project vision. 

The responsibilities of the scrum team

The scrum team is responsible for the practical side of the project because they will the story collection that the project he's based on, but in addition to this, the scrum team has a few more responsibilities which have to be fulfilled:
  • They must make sure that they update their daily progress in the scrum board.
  • They must validate that they deliver the shippable units they committed on them at the start of the sprint.
  • They should add real action items in the retrospective meeting that will enforce the most important rule in scrum of continues improvement. 
  • They should report for any problems they have during the sprint, so the scrum master can resolve it. 
  • They should make a real time estimation regarding the work effort they should perform in a sprint.
  • They must attend and participate in all scrum meetings (Daily, review, retrospective Etc.).

Sunday, May 21, 2017

The fundamentals of effective bug reporting | David Tzemach


There is no dispute about the importance of writing an effective bug report, it's the main key to the success of any Defect life cycle (DLC). Effective bug reports should base on a few basic fundamentals that I will cover during this article.

תוצאת תמונה עבור ‪bug reporting‬‏

Why effective bug reports are so important in the Defect life cycle? I know that you already know the answer, if not, just review this list: 

  • Effective bug reports will increase communication among team members.
  • Effective bug reports will increase the chances that the bug gets fixed.
  • Effective bug reports will reduce the programmer investigation time.
  • Effective bug reports will validate that the bug contains all the necessary information that will help during the fixing and verification process.

Bug reporting general guidelines

There are some basic guidelines that we must follow to make the bug report efficient as possible:
  • Isolate the bug, make sure that you identify exactly what the problem is (Root Cause).
  • Keep it simple and do not exaggerate, you are not writing an article or crime report.
  • Make sure that the bug report describes one specific bug (One bug = one report).
  • Prior to opening the bug, validate that the bug does not already exist in the system.
  • Make sure that you use technical facts and not personal opinions.
  • Do not use any abusive language, remember that both you and the developer has the same goal.

Bug reporting Mandatory fields

Bug Title

Once the bug is opened, the title becomes the first thing that other engineers will see, as a result, the bug title should be meaningful, descriptive and unique (usually built from 40-60 characters) in a way that will allow them to understand what the bug is without the need to read the full bug description. 

Bug Description

The bug description is the area that should extend the information about the bug based on the bug title including many artifacts such as:
  • How this bug will affect the system.
  • Expected Vs Actual results.
  • The environment variables
  • Description of the bug.
  • Reproduction scenario.

There are a few simple guidelines that we can use to validate that the bug description is suitable for the exactable quality standards:

  • Make sure that the description reflects the true and entire picture.
  • Describe the bug without any exaggeration.
  • Don’t use an inappropriate language.
  • Don’t add irrelevant information.
  • Use simple and clear language.

Reproduction scenario

A bug incident must include clear instructions on how to reproduce the problem so that others can reproduce it without the need to ask numerous questions. 

A good incident report will include a detailed information about the different phases that the programmer can follow to reproduce the bug, each step should include the relevant details and nothing more, remember that we do not need to write stories, just the MIN necessary information that will help others to reproduce the bug.

So how can you write a good reproduction scenario?

        1.    The reproduction flow must be clear.
        2.    The reproduction flow must be informative.
        3.    The reproduction flow must trigger the bug.
        4.    The reproduction flow, should not include irrelevant steps.
        5.    The reproduction flow must be tested prior to adding it.
        6.    The reproduction flow must include a prerequisite list (Test Environment, Testing data...).
        7.    Determine the reproduction availability
a.       Can you reproduce this defect?
b.       How much time does it take to reproduce this bug?
c.       Is this bug reproduced on the specific lab?
d.       Is this bug reproduced on different environments?
e.       Is this bug existing on older versions?


Details about the version and build

The bug report should include the name of the project, iteration and the exact build number that the bug was found on.

Environment Details

In this section, we should add some background information about the test environment used when the bug was found, the minimum information should include information about the Device type, operating system, platform and the setup configuration

Bug Severity

The severity of the bug will help to determine how severely the bug is in terms of damaging and affecting the system. For more information about bug "Severity" please read my previous article:

Bug priority

Determined by the team/project manager, and therefore I will exclude it from my review, but if you need more information you can use this link:

The Expected results

Remember, when you report a bug you describe an error or deviation from the system predefined requirements, in this section you need to describe the accurate way that the application should work.
In addition, we must add the expected results based on documentation and NOT by your personal opinion, otherwise, the developer will follow your opinion and fix the bug against the actual requirements.

The Actual results

In this section, we will describe the actual results that we got based on the reproduction scenario/or on any case that we want to report although we don’t actually know the exact steps that cause it. 

Saturday, May 20, 2017

How to use explicit wait in selenium webdriver | David Tzemach

תוצאת תמונה עבור ‪selenium webdriver explicit wait‬‏

In addition to the basic method of "Implicit" wait, selenium WebDriver also provides a more advanced method to handle synchronization issues that may rise during the tests execution, this method called "Explicit wait".

The major benefits of using the explicit wait:
  1. We can implement it against specific elements and other cases (Implicit wait is relevant to all elements in the DOM).
  2. We can write a specific condition to be enforced prior proceeding of the test execution.
  3. Not like the implicit wait, the explicit wait is not relevant to the entire Driver life cycle.
To define an explicit wait, selenium WebDriver provides two classes:

The WebDriverWait Class

This class provides the basic instruction to the driver, including notifications, polling intervals and how to handle exceptions during code execution. 

Class Member
Operation Type: Get/Set
Define the message to be displayed when time expires (We can use it also for determining the notification syntax).
Operation Type: Get/Set
Determine how often the condition is evaluated against the element (Default value is 500 milliseconds)
Operation Type: Get/Set
Determine the time to wait for a condition to return result (Default value is 500 milliseconds)
This method will allow us to ignore a specific type of exceptions returned from a condition.
Throw a WebDriverException with the specified message

The Expected Condition Class

This class provides a set of common conditions that we can use in addition to the WebDriverWait command, this condition will tell the driver to wait prior proceeding with the test execution.

Here are the major class members (Feel free to explore the remaining once):
Class Member
ElementExists ()
Validate that a given element is available in a DOM a page.
ElementIsVisible ()
Validate that a given element is available and visible on the DOM a page
ElementToBeClickable (IWebElement)
Validate that a given element is available and visible on the DOM so the user can click on it.
ElementToBeSelectable (IWebElement)
Validate if a given element is selected or not
FrameToBeAvailableAndSwitchToIt (By)
Validate whether a specific frame is available to switch to, if 'true', then the driver will move to the specified frame
InvisibilityOfElementWithText ()
Used to validate that an element with text is invisible/not present on the DOM
PresenceOfAllElementsLocatedBy ()
Used to Validate that all elements that matched to a specific locator are available on the web page
TextToBePresentInElementValue (By, String)
Used to validate if a given text is present in an element attribute value
TitleContains ()
Validate that the title of the page contains a specific string
Titles ()
Validate the title of the page
UrlContains ()
Validate that the page URL against a predefined string

Practical Examples of Explicit wait

In the following code snippet, I will use the ExpectedCondition Class to implement different examples of explicit waits (using the WebDriverWait Class):


public void ExplicitWait()
//Creating a new WebDriver instance
IWebDriver Firefox = new FirefoxDriver();

//Navigate to a web page

//Create instance of the WebDriverWait Class
WebDriverWait driverwaitinstance = new WebDriverWait(Firefox, TimeSpan.FromSeconds(20));

Using the "TitleContains" condition

The following code will validate that the Web Page title contains a specific syntax.

driverwaitinstance.Until(ExpectedConditions.TitleContains("David Tzemach's Blog"));

Using the "URLContains" condition

The following code will validate that the Page URL contains a specific syntax.


Using the "TextToBePresentInElement" method

The following code will validate that a specific element contains a specific text that we can define as a condition.

IWebElement textvalidation = Firefox.FindElement(By.XPath("//a[contains(text(),'Quality Assurance')]"));
driverwaitinstance.Until(ExpectedConditions.TextToBePresentInElement(textvalidation,"Quality Assurance"));

Using the ElementExists method

In this code snippet, we will use the ElementExists method to validate if a specific element is available in the DOM.

driverwaitinstance.Until(ExpectedConditions.ElementExists(By.XPath("//a[contains(text(),'Quality Assurance')]")));

Using the isElementPresent method

The following code will check for the element presence in the DOM of a page or not. Just remember that although the method can return 'True' (Element is present in the DOM), that does not guarantee that the element is visible, therefore we will use this method when we don't care about the element visibility.

driverwaitinstance.Until(ExpectedConditions.PresenceOfAllElementsLocatedBy(By.XPath("//a[contains(text(),'Quality Assurance')]")));

Using the isElementVisible method

The following code is used for checking that a specific element is both present and visible (With and Height > 0) in DOM.

The First option is to check the visibility of a single element:

y Assurance')]")));

The second option is to check the visibility of multiple elements:

The return value of this method is an IWebElement list of the visible elements

IList<IWebElement> ListOfElements = driverwaitinstance.Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.XPath("//option")));

Using the isElementClickable method

The following code is used for checking that a specific element is both Visible and Enabled.

driverwaitinstance.Until(ExpectedConditions.ElementToBeClickable(By.XPath("//a[contains(text(),'Quality Assurance')]")));

Using the InvisibilityOfElementLocated method

We can use this method to validate the invisibility of an element in DOM, the return type is bool (True if the element is not displayed, false if visible).

if (driverwaitinstance.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("epic-nav-item-heading"))) == true)
{//Perform Task A}
{//Perform Task B}

Using the InvisibilityOfElementWithText method

Another option that we can use to validate the invisibility of an element in DOM is using the InvisibilityOfElementWithText, the return type is bool (True if the element is not displayed, false if visible).

if (driverwaitinstance.Until(ExpectedConditions.InvisibilityOfElementWithText(By.ClassName("epic-nav-item-heading"), "Home")) == true)
{//Perform Task A}
{//Perform Task B}

Sunday, May 14, 2017

How to handle mouse and keyboard events in Selenium WebDriver


As you probably know, there are multiple operations in a webpage that you cannot cover with the basic strategies that we saw until now (Mouse operations, Drag-and-Drop…).

To perform such tasks, we will need to use an additional namespace (OpenQA.Selenium.Interactions ) that provides us the "Actions" class that we will use in the following paragraphs.

תוצאת תמונה עבור ‪How to handle mouse and keyboard events in Selenium WebDriver‬‏

Prior to the code examples, I will review the main methods of this class (There are few more that you can learn if you want to increase your knowledge):

Method Name
build ()
Builds the sequence of actions that were specified so far
Clicks the mouse on last know location
Click the mouse on a specific element
ClickAndHold ()
Clicks and holds the mouse on last know location
Click and holds the mouse on a specific element  
ContextClick ()
Right-clicks the mouse on last know location
Right-clicks the mouse on a specific element
DoubleClick ()
Double-clicks the mouse on last know location
Double-clicks the mouse on specific element
DragAndDrop ()
Performs a drag-and-drop operation on one element
Performs a drag-and-drop operation on one element to a specific offset
Moves the mouse to a specified element
Perform ()
Execute the currently build action
Release ()
Release the left mouse button from his current location
Release the left mouse button on the specified element

Simulating Double-Click on an element

In many cases, you will need to use the "Double-Click" event to trigger the functionality of a web element.  Selenium WebDriver API supports this operation using the Action class (C#).

The following code, will simulate a "Double-Click" event on a button, as a result, the text located in the first field, will be copied to the second one. 

<!DOCTYPE html><html><body>
<input type="text" id="TextBox1" value="Text To be Copied"><br>
<input type="text" id="TextBox2"><br><br>
<button ondblclick="CopyPaste()">Copy Text</button><script>
function CopyPaste() { document.getElementById("TextBox2").value = document.getElementById("TextBox1").value;

public void DoubleClickEvent()
IWebElement button;
IWebDriver Firefox = new FirefoxDriver();
//Firefox.Navigate().GoToUrl("Webpage Address");
button = Firefox.FindElement(By.XPath("/html/body/button"));
Actions trigger = new Actions(Firefox);


Simulating Mouse and Keyboard events

Selenium API supports Keystroke combinations of mouse and Keyboard events, the following code example will simulate a situation, where the user selects multiple values with "Ctrl" button and Left mouse button clicks.

In the following code example, we will use press the "Ctrl" button (Keep it pressed) and select multiple grid values with the mouse.

<select name="AnimalNames" size="5" multiple="multiple" style="width:100px">
 <option value="fo">Fox</option>
 <option value="du">Duck</option>
 <option value="sh">Shark</option>
 <option value="ti">Tigar</option>
 <option value="ea">Eagle</option>

public void MouseAndKeyboardSync()
IWebDriver Firefox = new FirefoxDriver();
//Firefox.Navigate().GoToUrl("Webpage Address");
IList<IWebElement> ListOfElements = Firefox.FindElements(By.XPath("//option"));
Actions MultipleSelectionUsingCTRL = new Actions(Firefox);


Simulating Context-Menu on an element

Another basic option that you may encounter during a testing development, it when you will need to open and choose one of the options of a "Context menu" of an element.

In this code example, we will open the context menu on an element and choose the second option of "Open in a new window".


public void ContextClick()
IWebElement WebElement;
IWebDriver Firefox = new FirefoxDriver();
Actions ContextClickTrigger = new Actions(Firefox);
WebElement = Firefox.FindElement(By.XPath("//a[contains(text(),'Quality Assurance')]"));

Simulating drag-and-drop operation

As we saw before, we can use the action class to simulate both simple and complex chain of events, in this code, we will perform the "drag-and-drop" operation using the " DragAndDrop" function.


public void DragAndDrop()
IWebDriver Firefox = new FirefoxDriver();
//Firefox.Navigate().GoToUrl("Webpage Address");
Actions DragandDrop = new Actions(Firefox);
Actions builder = new Actions(Firefox);
IWebElement SourceElement = Firefox.FindElement(By.Name("source"));
IWebElement DestinationElment = Firefox.FindElement(By.Name("destination"));

Option no'1

Option no'2
builder.DragAndDrop(SourceElement, DestinationElment).Build().Perform();

My Presentations