Be your own SaaS

You take a few products from open source, integrate, customise. It’s still called development, and it still requires skill – that is is you want your test framework to be stable and grow. It needs skill, as you need to minimise product-dependencies ongoing, or you can quickly get lost in spiral of dependency failures, as you update core framework.

You can chase rainbows for the ultimate test automation tool – there are those using open source, with same dire “all your problems are over” style taglines for their SaaS.

While you are chasing your rainbow, I will have built a framework and maintained it for resusability and open to all to use – tech and non-tech people alike. By trusting a third-party vendor or SaaS, you constrict your team immediately to work a certain way. It limits creativity and relevance.

Do you get the feeling the British government isn’t doing us any good?

  • The banned psychoactive substances, but not tobacco.
  • They make shops cover up the cigarettes shelves, but alcohol is on full display (and in reach of kids).
  • They claim to be working for greener future, yet pollution in London is rising (and killing).
  • They nod head to towards war on drugs, but remain impotent as corruption/collusion exists at high-level.
  • They push for private healthcare but still trade off the public’s emotional attachment to nhs.
  • They implement tax laws that crush 1000’s of small businesses, but help large corporates.
  • They claim to get tough on crime, yet some gangs exist with no challenge to their activities.
  • They sell off revenue departments to private companies.
  • They allow property development companies to dictate planning.
  • They have allowed massive investment in London, from highly dubious sources.
  • They have somehow managed to make education system worse since than the 1980’s.
  • They created departments/hotlines for reporting public fraud to councils, though still no accountability of the more worrying fraud/corruption inside councils.
  • They (all parties) constantly and incessantly lie.

Test engineering

OK, let’s cut to the chase. Testers are part of your team, not an anonymised bolt-on. This was an attitude prevalent 20 years ago, but at least then, testers were taken seriously. What we have now is too many making evaluations of what testing is and where it should fit in. Testing is a free-for-all area that many self-appointed experts reside in. And the more testing becomes test engineering, the more foolish those people look.

Who (as a tester) has not heard the response to you job “what, you just sit around surfing website all day?”. Well, these people are not worth correcting, but it illustrates a point – even with 20 years QA experience, it amazes me how many feel need to tell me what I do, and why I do it. My twitter feed gauge my annoyance levels, full as it is, of strongly-worded diatribes on this subject. It is bad enough that in contracting, I am generally following in wake of amateur balls-ups. And balls-ups that went on for too long, as no-one took interest or monitoring the ongoing development of tests.

Part of problem is that testing world is full of enthusiasm, but few with real test engineering skills. Want to impress your average company? Create hundreds of brittle UI automated tests, built on latest “funky framework”, then bask in the multiple “oooooooh!”, then time exit before anyone notices that:

  • No-one is using the test framework repo, apart from the tester.
  • No-one else is checking out the repo.
  • The tester becomes “Manuel Jenkins”, as the test framework only ever running on their pc.
  • The hundreds of tests are pointless, useless and throwaway

Then I come in to mop up the mess, and deal with bad perceptions/understanding about test engineering. There is a problem around the decision-making process, usually made by project members who view a project like this:

Airplane

Generally, process and products are selected based on personal taste or even fashion (the worst). These are always sold with over-optimistic promises of improving things, simply by their existence on project. These helpful individuals may not even be connected with tech – maybe they just enjoyed a pretentious demonstration at a conference. And react like they have never heard the time-honoured sales line “All you problems are solved with this product!”. The people that decide test framework are the team, because they are the saps that have to use and maintain it.

Though a broad statement, test engineering is very effective bridge between development and devops. Yes, developers can factor in test framework maintenance and coding tests, into their workload. But why? It’s far better to have a well-maintained test framework they can use as necessary, rather than being concerned with it’s mechanics. Calling test engineering “developing in test” provided more confusion, as many role descriptions were essentially for a developer who was also prepared to write acceptance tests. By that, I mean tests that directly map to requirements, not unit tests.

If the test engineer is charged with creating and maintaining UI and API tests, this can save the developers a lot of unit test work, and if test framework set running on the build server, an excellent sanity check for every build. And based of real-life scenarios. The common whine when trying to get is that it gets in the way. Really? A failing test is an obstruction, and should be (whatever the reason it fails). Acceptance tests should be part of the build pipeline. Tests don’t obstruct, they inform.

I am generally following in wake of amateur balls-ups. And balls-ups that went on for too long, as noone took interest or monitoring the ongoing development of tests. Want to impress your average company? Create hundreds of brittle UI automated tests, bask on the multiple “oooooooh!”, then time exit before anyone notices that:

  • No-one is using the test framework repo, apart from the tester.
  • No-one else is checking out the repo.
  • The tester becomes “Manuel Jenkins”, as the test framework only ever running on their pc.
  • The hundreds of tests are pointless, useless and throwaway

Then I come in to mop up the mess, and deal with bad perceptions/understanding about test engineering. There is a problem around the decision-making process, usually made by project members who view a project like this:

Airplane

So process and products are selected based on personal taste, fashion (the worst). These are always sold with over-optimistic promises of improving things, simply by their existence on project.

Though a broad statement, test engineering is very effective bridge between development and devops. Yes, developers can factor in test framework maintenance and coding tests, into their workload. But why? It’s far wetter to have a well-maintained test framework they can use as necessary, rather than being concerned with it’s mechanics. Calling test engineering “developing in test” provided more confusion, as many role descriptions were essentially for a developer who was also prepared to write acceptance tests. By that, I mean tests that directly map to requirements, not unit tests.

If the test engineer is charged with creating and maintaining UI and API tests, this can save the developers a lot of unit test work, and if test framework set running on the build server, an excellent sanity check for every build. And based of real-life scenarios. The common whine when trying to get is that it gets in the way. Really? A failing test is an obstruction, and should be (whatever the reason it fails). Acceptance tests should be part of the build pipeline. Tests don’t obstruct, they inform.

UI/API Test Framework Github Repos

CucumberJS/Protractor

[embedGitHubReadme owner=”jaffamonkey” repo=”cucumberjs-protractor-kickstart”]

Behat/Mink

[embedGitHubReadme owner=”jaffamonkey” repo=”behat-3-kickstart”]

Jasmine/Protractor

[embedGitHubReadme owner=”jaffamonkey” repo=”protractor-jasmine”]

CucumberJS/Protractor(Basic)

[embedGitHubReadme owner=”jaffamonkey” repo=”cucumberjs-protractor-basic”]

Behat with Docker

[embedGitHubReadme owner=”jaffamonkey” repo=”docker-behat-1″]

cucumberjs/protractor – dealing with non-angular popups

When creating cucumberjs/protractor test that involves dealing with a non-angular pop-up window, you can use combination of the getAllWindowHandles, and the ignoreSynchronization flag. The example below is a facebook SSO login (previous step was simply clicking link to login with facebook, to bring up the popup)


 this.Given(/^I login with facebook$/, function () {
        browser.getAllWindowHandles().then(function (handles) {
            var buttonName = 'fb login';
            browser.switchTo().window(handles[1]);
            // this switches focus of protractor the facebook login popup
            browser.ignoreSynchronization = true;
            // this tells protractor it's now a non-angularjs page
            fillField('facebook id', '{facebook login email');
            fillField('facebook password', '{facebook password}');
            return getVariable[buttonName.replace(/s+/g, '')].click().then(function () {
                browser.switchTo().window(handles[0]);
                // this switches focus of protractor back to main angularjs window
                browser.ignoreSynchronization = false;
               // this tells protractor it's now a angularjs page
            });
        });
    });