Wednesday, 8 January 2020

When can you consider yourself a competent creator of automated tests?

There are a lot of things to consider when creating automated tests:

a) environment; is it integrated and so what else will it affect.

b) data; how do you want to ensure the data is correct, is there an api or database you can use to create it before running the tests? Or even a docker instance with the data already created.

c) maintenance; how to keep maintenance of tests at a minimum. A good Data creation strategy will help with that and depending on your tool, e.g. selenium, you may need to create a good wait system. The newer javascript frameworks take care of this problem for you. But also what are your selectors, can they still locate the element if it moves within the domain object model? What about using ai to find elements?

d) clean up; do you need to erase all the data or drop the database at the end of testing? Or do you spin up a clean environment every time your tests run?

d) and on and on e.g. what and how do we report, how many tests do we want to run in parallel etc.

However, the aim of this article is not concerned with the above, as I would expect a good automated tester to consider those.
The article’s focus is on: when do I consider you can begin to think of yourself as venturing into senior territory.

The answer is when you begin to take an overall view; i.e. who else is using your framework and how does it fit into your organisation’s attempt to create a product without serious bugs. Once this occurs, the following things will begin to be thought about:

a) is it easy for another tester to understand how the framework works so they can easily add to it?
A major step is when you understand this comes above having the most concise code.

b) are your assert error messages providing useful information?  Ideally your developers will have tests automatically executed on a commit, so can they understand why something failed?

c) are your git commit messages useful to other people who will use your framework?  Commit messages are useful to see what fix(es) you made in a certain situation, so this can be repeated if a similar problem occurs.

d) do your non-technical team members need to understand the tests? Does a business analyst need to see you have a test in a certain area? Does it need to be in gherkin or pseudo english?
This will come down to a teams particular requirements.

e) is the reporting transparent and up to date?
If you have a dashboard and it is reporting fails are they looked at immediately so everybody else knows there is a real problem (rather than a problem with the framework)?


There are a lot of things to consider when creating an automated tests:

a) environment; is it integrated and so what else will it affect.

b) data; how do you want to ensure the data is correct, is there an api or database you can use to create it before running the tests? Or even a docker instance with the data already created.

c) maintenance; how to keep maintenance of tests at a minimum. A good Data creation strategy will help with that and depending on your tool, e.g. selenium, you may need to create a good wait system. The newer javascript frameworks take care of this problem for you. But also what are your selectors, can they still locate the element if it moves within the domain object model? What about using ai to find elements?

d) clean up; do you need to erase all the data or drop the database at the end of testing? Or do you spin up a clean environment every time your tests run?

d) and on and on e.g. what and how do we report, how many tests mdo we want to run in parallel etc

However, the aim of this article is not concerned with the above, as I would expect a good automated tester to consider those.
The article’s focus is on: when do I consider you can begin to think of yourself of venturing into senior territory.

The answer is when you begin to take an overall view; i.e. who else is using your framework and how does it fit into your organisation’s attempt to create a product without serious bugs. Once this occurs, the following things will begin to be thought about:

a) is it easy for another tester to understand how the framework works so they can easily add to it?
When you understand this comes above having the most concise code, then this is a major step.

b) are your assert error messages providing useful information?  Ideally your developers will have tests automatically executed on a commit, so can they understand why something failed?

c) are your git commit messages useful to other people who will use your framework?  Commit messages are useful to see what fix(es) you made in a certain situation, so this can be repeated if a similar problem occurs.

d) do your non-technical team members need to understand the tests? Does a business analyst need to see you have a test in a certain area? Does it need to be in gherkin or pseudo english?
This will come down to a teams particular requirements.

e) is the reporting transparent and up to date?

If you have a dashboard and it is reporting fails, are they looked at immediately so everybody else knows there is a real problem (rather than a problem with the framework)?

Monday, 18 June 2018

Make your jmeter test creation easier with the blazemeter plugin

Jmeter

You can record your jmeter scripts using jmeter, but you have to:

  1. setup a proxy.
  2. Add certificates in your  browser.  

Blazemeter Plugin

However there is an easier way: use the blazemeter plugin.

Download it here.

You do need to setup an account, but once you do, you can export to a .jmx file.  Then once you import the file into jmeter, you can use it like you would any other .jmx file.

Friday, 15 June 2018

A tool to help identify the cause of a bug: monitorEvents in chrome


monitorEvents()

The monitorEvents() method instructs the DevTools to log information on the specified targets.
The first parameter is the object to monitor. All events return if the second parameter is not provided. To specify the events to listen to, pass either a string or an array of strings as the second parameter.

To listen to click events on the body of the page, enter the following in the console:
monitorEvents(document.body, "click");