8

I'm kind of new to software automation and I'm doing UI automation by using selenium webdriver. I have heard that there are some tools, that can automate a system before we get the UI of the system with proper element paths.(so we don't need to stay to automate the system until development get finished)

Can someone please tell me a software automation tool like that.

  • 1
    Also, Test automation is a rapidly growing field with plenty of resources out there. What have you done to research this topic? – Marit Jan 25 '18 at 13:15
  • What language you are using with selenium? – Vishal Aggarwal Jan 27 '18 at 23:48
  • I'm using Java. – ShadowTK Jan 29 '18 at 4:56
3

Are you asking about test driven development? This practice need not just tools, but also special steps/processes prior to writing a test or any code. Try to look at the article and the tools list here: Introduction to Test Driven Development (TDD). Most of them are, of course, a unit testing tools. But some of them are more complex.

Also, a Wikipedia article about TDD is full of information, but not so practically described: Test-driven development @ Wikipedi

I can imagine, if you keep some constraints, you will be able to automate a GUI by TDD techniques, but it is not such common. Some say, that Selenium is not a suitable framework for TDD, but it is just a tool and it depends on the process you will apply. Some will just use the simplified methodology of writing tests prior to the code and they just write it no matter what the framework is. (and they call it TDD). This approach could be reached by Cocumber or Robot framework, same as Protractor, but you will need to write the framework by yourself.

There is a special area of ATTD tools, which is a slightly different technique from TDD, you can read something about difference and the tools here: ATTD @ Asser Selenium

9

You could start with unit tests, while the application is being developed. In Java you can use JUnit for this. If you don't have a fully functioning system yet, you can use mocking to mock objects. In Java this is done with Mockito or JMockit. Look into unit testing and TDD (Test Driven Development).

Once you are ready to integrate different components, look at integration tests. You can do those at lower levels than UI. If there are API's available you could test through rest endpoints, for which again there are plenty of tools available. For instance: RestAssured, Karate, Postman.

Have a look here for the difference between unit and integration tests.

Once those tests are in place, you might add a few UI tests on top. As those are generally slow and brittle, try not to have too many. Have a look at the Test Pyramid.

Finally, if you are a UI tester and need to test through the UI only, you can still start designing and implementing your tests while the application is being developed. You could use Page Object pattern to describe the expected interaction with the system, declare the elements you will interact with and the methods to do so, and fill the locators once these are available. This is often how I develop Front End tests.

  • actually, an acronym TDD is more know with Development in the end. A Design is something very different, somehow higher level, stating that TDD is good as an overall design practice. This is not true in all cases, so better stick to what really works, not such theories. This could be a bit misleading, therefore -1 – Dee Feb 2 '18 at 9:33
  • Thnx. Fixed typo :) – Marit Feb 2 '18 at 13:16
  • ok then lifted to +1, but it is then questionable response... – Dee Feb 4 '18 at 20:07
3

You are UI tester, so tools and approaches for unit testing (TDD) suggested in other answers are mostly useless for you.

I hope your developers are working in iterations (not a waterfall), so your concern of what to do while code is being developed is valid only for first iteration. After first iteration, you should have working code delivered in the integration area/system (however you call it) and ready to be tested.

During first iteration (which usually takes 1-3 weeks), you should read all the requirements very closely, look for conflicts and/or missed requirement, and prepare:

  • testing scenarios (what and how to test) in customer-readable text, which you would later expand to executable scripts
  • test data (or tools to generate test data)
  • 1
    I disagree strongly with "tools and approaches for unit testing are useless for you". The same tools and frameworks can often be used for any level of testing, and the approaches are extremely similar. – Corey Goldberg Feb 2 '18 at 19:27
  • 1
    @CoreyGoldberg - it depends on your definition of "extremely similar". Unit testing code exercising some library API is quite different than selenium code exercising workflow over few webpages. Yes, both can use same test runner, and be written in the same language, but not much more. OK , I qualified "useless". – Peter M. Feb 2 '18 at 19:36
2

Given you use Selenium most probably your target is a web application. One of the options would be go a level down and perform your testing using HTTP Protocol, the pros are:

  • The tests are not that fragile as UI-based ones
  • CPU and memory footprints of protocol-based tests are much lower
  • Functional tests can easily be turned into load tests by just adding more threads (virtual users)

the only one con I can think of is that protocol based testing won't trigger client-side JavaScript so any functionality relying on it should be covered somehow else.

You can find quite a list of free and open source load testing tools here.

If you are looking for the one to stick to you can consider Apache JMeter, probably the most popular multiprotocol load testing framework which supports web, databases, email servers, file servers and much more. See How to Use JMeter for Backend-Based Functional Testing to learn more about the concept of using load testing tools in general and JMeter in particular for functional testing.

1

If you are strictly doing UI automation limited to black box testing only, then I would recommend top to bottom approach doing BDD/ ATDD using tools like cucumber which sit on top of selenium.

Till development is complete , in parallel you may start developing feature files based on user stories, once development is complete ,or UI is available (mockups) you may develop and plug-in(in step definitions) the selenium code to the features files and your automation will light up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.