Browser extensions for testing

Here are some interesting browser extensions/add-ons that might be helpful:

Test IE -  Test websites in real Internet Explorer (IE6, IE7, IE8, IE9, IE10 and IE11) straight from Chrome browser, through BrowserStack.

Browserling - Cross-browser testing - Browserling is a live interactive cross-browser testing service that provides effortless cross-browser testing for web developers and web designers.

aXe - Accessibility testing in Chrome Developer ToolsAutomated tool to find Accessibility defects on your web site by using the aXe Chrome extension. Drop the aXe on your accessibility defects!

JaSON - JSON and XML test utility.A simple, easy to use utility for testing and debugging JSON and XML web services. Send requests over HTTP or HTTPS and see formatted, syntax highlighted responses. Also supports sending of form encoded request parameters. Supports the following HTTP operations: - GET - POST - PUT - DELETE - HEAD

Wizdler - Parses the WSDL files and generates SOAP messages for you.

YSlow - YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow grades web page based on one of three predefined ruleset or a user-defined ruleset. It offers suggestions for improving the page's performance, summarizes the page's components, displays statistics about the page.

Firebug Lite - Firebug Lite provides the rich visual representation we are used to see in Firebug when it comes to HTML elements, DOM elements, and Box Model shading. It provides also some cool features like inspecting HTML elemements with your mouse, and live editing CSS properties.

Web Developer Checklist - Analyses any web page for violations of best practices

Postman - Postman helps you build, test, and document APIs faster. Postman features include: - History of sent requests - Create requests quickly - Replay and organize - Switch context quickly - Built-in authentication helpers - Customize with scripts - Robust testing framework - Automate collections

Advanced REST client - The web developers helper program to create and test custom HTTP request

Proxy SwitchySharp - Manage and switch between multiple proxies quickly & easily. Based on "Proxy Switchy!" & "SwitchyPlus"

Bug Magnet - Right-click context menu to help with exploratory testingExploratory testing assistant for Chrome. Adds common problematic values and edge cases to the context menu (right-click) for editable elements, so you can keep them handy and access them easily during exploratory testing sessions.

Yet Another Lorem Ipsum Generator - Inserts - paragraphs of variable length - titles - specific or random dates - mail addresses - internet addresses All functionality is also accessible from the context menu.

Exploratory Testing Chrome Extension - Exploratory testing session using ChromeA Chrome extension designed for making web exploratory testing easier Features: - Report bugs, ideas, notes and questions easily - Take screenshots during the session. Keep focused - URL will be tracked automatically - See session results in a report - Export session to CSV or HTML


LeanFT - Proof of Concept

Findings and POC for using LeanFT as part of the Contentious Integration build:

  1. LeanFT uses the UFT SDK 
  2. Allows coding your tests in C# and Java in your favorite IDE (documentation is focused around Visual Studio and Eclipse)
  3. Any add-in can be automated Standard Windows, WPF, .NET, Mobile etc..


You should now see: C:\Program Files (x86)\HP\LeanFT\bin

Browser Prerequisite:

  • In the Firefox browser menu, select Add-ons and then click Extensions. Drag the Agent.xpi file from the%LeanFT%\Installations\Firefox folder to the Firefox Extension page and click ‘Install now’.
  • If you are testing against Chrome ensure the LeanFT plugin is enabled from Chrome Settings -> Extensions.
  • With IE, go to Settings -> Manage Addons where HP Functional Testing Agent must be enabled.
Download the sdk jars/dll:

SDK reference:

Test Automation skills for 2016

I would not agree with all the graphs here but a good depiction of what's hot in the market:

Source: http://blog.testproject.io/2015/12/03/worlds-most-desirable-automation-skills/


parent = 'null' cardNumber = 'null' while running serenity using Maven

Technology Stack: Serenity + Cucumber + Jnit

Problem: If you have been using Serenity and have seen that your reports don't show up the capabilities/epics that have been run. If you dig further you would notice that in your logs there is a statement where the epics/capability isn't able to find its parent, cardNumber


What would not work:

  • Updating pom file
  • Using latest jars 
What works: Path to the requirements directory like this:

serenity.requirements.dir = src/test/resources/features

Issue while setting up TestNG and Maven from Scratch

Here is what a good friend of mine was facing with TestNG and Maven: 


For your Blog:

Issue while setting up TestNG and Maven from Scratch:

Eclipse TestNG Plugin Version which is higher than TestNG jar in your pom dependecy, will fail to either Start or Quit the driver.

For example, I downloaded TestNG Eclipse plugin 6.9.10, but my pom.xml had a dependency on version 6.9.9. I kept getting the Unreachable Browser Exception for IE, Chrome and Mozilla.

I downloaded TestNG plugin 6.9.4, which is more stable, but my pom.xml had a dependency on version 6.8. The webdriver struggled to open and reported a "java.net.SocketException: Software caused connection abort: socket write error", though my test completed successfully. I received this error again across all 3 drivers, i.e Firefox, IE and Chrome.

So to fix the above issues, I kept the plugin version 6.9.4, but increased the pom dependency on Test NG jar to 6.9.9. Result was a smooth execution.

I hope this piece of information can be of some help to people struggling setting up maven and testng for the first time.



Source: Email from Siddharth Dhar

Failed while enforcing RequireUpperBoundDeps - Maven IntelliJ

Problem: If you are using Maven and you have the enforcer plugin , you might see the error "Failed while enforcing RequireUpperBoundDeps"

Solution: Since we almost always make changes in a backward-compatible manner, it looks like the best solution for us is to ensure that the latest versions of dependencies are used. The Maven Enforcer plugin with the "Require Upper Bound Dependencies" feature accomplishes this.
This rule requires that the version for each dependency resolved during a build, is equal to or higher than all transitive dependency declarations. The version of each dependency resolved during the build will normally be the version specified in the POM or the version with the least transitive steps (the "nearest" definition). For more information about Maven dependency resolution, see the Maven site.


Unprotect Excel Spreadsheet If you don't know the password

This is the easiest hack ever :
With the Excel spreadsheet open,
  1. Press Alt + F11 (or go to View Code in the Developer’s Tab)
  2. In the window that appears, paste in this code (courtesy of University of Wisconsin-Green Bay)
    Sub PasswordBreaker()
        'Breaks worksheet password protection.
        Dim i As Integer, j As Integer, k As Integer
        Dim l As Integer, m As Integer, n As Integer
        Dim i1 As Integer, i2 As Integer, i3 As Integer
        Dim i4 As Integer, i5 As Integer, i6 As Integer
        On Error Resume Next
        For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
        For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
        For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
        For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
        ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
            Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
            Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
        If ActiveSheet.ProtectContents = False Then
            MsgBox "One usable password is " & Chr(i) & Chr(j) & _
                Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
                Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
             Exit Sub
        End If
        Next: Next: Next: Next: Next: Next
        Next: Next: Next: Next: Next: Next
    End Sub
  3. Press F5 (or click Run) and wait a minute or so…..hey presto, spreadsheet unprotected.

Source: http://geeknewscentral.com/2013/11/10/unprotecting-excel-spreadsheets-without-a-password/


Complete list of Serenity properties

The Serenity Reference Manual:
Serenity properties
Absolute path of the property file where Serenity system property defaults are defined. Defaults to~/serenity.properties
What browser do you want your tests to run in, for example firefox, chrome, phantomjs or iexplorer. You can also use the driver property as a shortcut.
If using a provided driver, what type is it. The implementation class needs to be defined in the webdriver.provided.{type} system property.
The default starting URL for the application, and base URL for relative paths.
The URL to be used for remote drivers (including a selenium grid hub or SauceLabs URL)
What port to run PhantomJS on (used in conjunction with webdriver.remote.url to register with a Selenium hub, e.g. -Dphantomjs.webdriver=5555 -Dwebdriver.remote.url=http://localhost:4444/wd/hub
The driver to be used for remote drivers
A set of user-defined capabilities to be used to configure the WebDriver driver. Capabilities should be passed in as a space or semi-colon-separated list of key:value pairs, e.g. "build:build-1234; max-duration:300; single-window:true; tags:[tag1,tag2,tag3]"
How long webdriver waits for elements to appear by default, in milliseconds.
How long webdriver waits by default when you use a fluent waiting method, in milliseconds.
Path to the Chrome driver, if it is not on the system path.
The home directory for Serenity output and data files - by default, $USER_HOME/.serenity
Where should reports be generated.
What name should appear on the reports
Should Serenity only store screenshots for failing steps? This can save disk space and speed up the tests a little. It is very useful for data-driven testing. This property is now deprecated. Use serenity.take.screenshots instead.
Extension packages. This is a list of packages that will be scanned for custom TagProvider implementations. To add a custom tag provider, just implement the TagProvider interface and specify the root package for this provider in this parameter.
Should Serenity take screenshots for every clicked button and every selected link? By default, a screenshot will be stored at the start and end of each step. If this option is set to true, Serenity will record screenshots for any action performed on a WebElementFacade, i.e. any time you use an expression like element(…​).click(), findBy(…​).click() and so on. This will be overridden if the ONLY_SAVE_FAILING_SCREENSHOTS option is set to true. @Deprecated This property is still supported, but serenity.take.screenshots provides more fine-grained control.
Set this property to have more finer control on how screenshots are taken. This property can take the following values:
  • FOR_EACH_ACTION : Similar to serenity.verbose.screenshots
  • FOR_FAILURES : Similar to serenity.only.save.failing.screenshots
Encoding used to generate the CSV exports
Set this property to provide more detailed logging of WebElementFacade steps when tests are run.
Should Thucydides display detailed information in the test result tables. If this is set to true, test result tables will display a breakdown of the steps by result. This is false by default.
Show statistics for manual tests in the test reports.
Report on releases (defaults to true).
During data-driven tests, some browsers (Firefox in particular) may slow down over time due to memory leaks. To get around this, you can get Serenity to start a new browser session at regular intervals when it executes data-driven tests.
Pause (in ms) between each test step.
Useful if you are running Firefox tests against an HTTPS test server without a valid certificate. This will make Serenity use a profile with the AssumeUntrustedCertificateIssuer property set.
Don’t accept sites using untrusted certificates. By default, Thucydides accepts untrusted certificates - use this to change this behaviour.
How long should the driver wait for elements not immediately visible.
serenity.browser.width and serenity.browser.height
Resize the browser to the specified dimensions, in order to take larger screenshots. This should work with Internet Explorer and Firefox, but not with Chrome.
Value in pixels. If set, screenshots are resized to this size. Useful to save space.
Set to true if you wish to save the original unscaled screenshots. This is set to false by default.
Set this property to true to save the HTML source code of the screenshot web pages. This is set to false by default.
The URL used to generate links to the issue tracking system.
Activate the Firebugs and FireFinder plugins for Firefox when running the WebDriver tests. This is useful for debugging, but is not recommended when running the tests on a build server.
Defines batch strategy. Allowed values - DIVIDE_EQUALLY (default) and DIVIDE_BY_TEST_COUNT. DIVIDE_EQUALLY will simply divide the tests equally across all batches. This could be inefficient if the number of tests vary a lot between test classes. A DIVIDE_BY_TEST_COUNT strategy could be more useful in such cases as this will create batches based on number of tests.
If batch testing is being used, this is the size of the batches being executed.
If batch testing is being used, this is the number of the batch being run on this machine.
Set this to run all web tests in a single browser.
Set this property to override the default locator factory with another locator factory (for ex., AjaxElementLocatorFactory or DefaultElementLocatorFactory). By default, Serenity uses a custom locator factory called DisplayedElementLocatorFactory.
Activate and deactivate native events for Firefox by setting this property to true or false.
Set this to true to enable Java support in Firefox. By default, this is set to false as it slows down the web driver.
The base folder of the sub-module where the jBehave stories are kept. It is assumed that this directory contains sub folders src/test/resources. If this property is set, the requirements are read from src/test/resources under this folder instead of the classpath or working directory. This property is used to support situations where your working directory is different from the requirements base dir (for example when building a multi-module project from parent pom with requirements stored inside a sub-module)
HTTP Proxy URL configuration for Firefox and PhantomJS
HTTP Proxy port configuration for Firefox and PhantomJS
HTTP Proxy type configuration for Firefox and PhantomJS
HTTP Proxy username configuration for Firefox and PhantomJS
HTTP Proxy password configuration for Firefox and PhantomJS
Three levels are supported: QUIET, NORMAL and VERBOSE
The root package for the tests in a given project. If provided, Serenity will use this as the root package when determining the capabilities associated with a test. If you are using the File System Requirements provider, Thucydides will expect this directory structure to exist at the top of the requirements tree. If you want to exclude packages in a requirements definition and start at a lower level in the hierarchy, use the serenity.requirement.exclusionsproperty.
This is also used by the PackageAnnotationBasedTagProvider to know where to look for annotated requirements.
Use this property if you need to completely override the location of requirements for the File System Provider.
By default, Thucydides will read requirements from the directory structure that contains the stories. When other tag and requirements plugins are used, such as the JIRA plugin, this can cause conflicting tags. Set this property to false to deactivate this feature (it is true by default).
Use this property if you need to completely override the location of requirements for the Annotated Provider. This is recommended if you use File System and Annotated provider simultaneously. The default value is stories.
The hierarchy of requirement types. This is the list of requirement types to be used when reading requirements from the file system and when organizing the reports. It is a comma-separated list of tags.The default value is: capability, feature.
When deriving requirement types from a path, exclude any values from this comma-separated list.
The base directory in which requirements are kept. It is assumed that this directory contains sub folders src/test/resources. If this property is set, the requirements are read from src/test/resources under this folder instead of the classpath or working directory. If you need to set an independent requirements directory that does not follow the src/test/resources convention, use `serenity.requirements.dir1 instead
This property is used to support situations where your working directory is different from the requirements base dir (for example when building a multi-module project from parent pom with requirements stored inside a sub-module.
What tag names identify the release types (e.g. Release, Iteration, Sprint). A comma-separated list. By default, "Release, Iteration"
Normally, Serenity uses SmartElementLocatorFactory, an extension of the AjaxElementLocatorFactory when instantiating page objects. This is to ensure that web elements are available and usable before they are used. For alternative behaviour, you can set this value to DisplayedElementLocatorFactory, AjaxElementLocatorFactory or DefaultElementLocatorFactory.
Arguments to be passed to the Chrome driver, separated by commas.
The path to the directory of the profile to use when starting firefox. This defaults to webdriver creating an anonymous profile. This is useful if you want to run the web tests using your own Firefox profile. If you are not sure about how to find the path to your profile, look here: http://support.mozilla.com/en-US/kb/Profiles. For example, to run the default profile on a Mac OS X system, you would do something like this:
$ mvn test -Dwebdriver.firefox.profile=/Users/johnsmart/Library/Application\ Support/Firefox/Profiles/2owb5g1d.default
On Windows, it would be something like:
C:\Projects\myproject>mvn test -Dwebdriver.firefox.profile=C:\Users\John Smart\AppData\Roaming\Mozilla\Firefox\Profiles\mvxjy48u.default
A semicolon separated list of Firefox configuration settings. For ex.,
Integer and boolean values will be converted to the corresponding types in the Firefox preferences; all other values will be treated as Strings. You can set a boolean value to true by simply specifying the property name, e.g. -Dfirefox.preferences=app.update.silent.
A complete reference to Firefox’s configuration settings is given here.
Add extra columns to the CSV output, obtained from tag values.
Write the console headings using ascii-art ("ascii", default value) or in normal text ("normal")
Comma separated list of tags. If provided, only jUnit classes and/or methods with tags in this list will be executed. For example,
mvn verify -Dtags="iteration:I1"

mvn verify -Dtags="color:red,flavor:strawberry"
What format should test results be generated in. By default, this is "json,xml".
Set this property to asciidoc to activate using Asciidoc format in narrative text.
If the base JIRA URL is defined, Serenity will build the issue tracker url using the standard JIRA form.
If defined, the JIRA project id will be prepended to issue numbers.
If defined, the JIRA username required to connect to JIRA.
If defined, the JIRA password required to connect to JIRA.
Display the pie charts on the dashboard by default. If this is set to false, the pie charts will be initially hidden on the dashboard.
If set, this will define the list of tag types to appear on the dashboard screens
dashboard.excluded.tag.list::If set, this will define the list of tag types to be excluded from the dashboard screens
Format the JSON test outcomes nicely. "true" or "false", turned off by default.
Stack traces are by default decluttered for readability. For example, calls to instrumented code or internal test libraries is removed. This behaviour can be deactivated by setting this property to false.
Run through the steps without actually executing them.
What (human) language are the Cucumber feature files written in? Defaults to "en".
Keep the Thucydides session data between tests. Normally, the session data is cleared between tests.