gauri pranaya
gauri pranaya

Reputation: 67

Testing Enterprise Web Application using Selenium

I am new to Selenium Automation. My company is following DevOPS for software delivery. Though I am comfortable using the framework and automating some easy tests, I wonder how much functionality I can automate in an Enterprise Web Application . We use Java , Cucumber , Junit and Jenkins for test automation. Can somebody kindly answer the below questions and give me guidance

  1. Front end of my application is developed using ExtJS and backend with Java/Oracle. There are workflow automations in my application that are implemented using Redhat Jboss Business Process Management (JBPM). I have been testing these workflow automations manually for years. Now there is a strong pitch to automate them. These workflow automations are triggered by events or on expiration of timers. How do I automate them?

  2. There are test in my application where I perform some activity in my application and have to wait for sometime before I proceed. Are these right candidates for automation. Should I make Selenium wait before I proceed?

  3. We are going to implement CA LISA for Service Virtualization. Is Selenium the right tool to test those virtualized services?

  4. For each test case, I setup the browser, Login and perform the test. Once the test finishes, I teardown by logging off and closing the browser. Is this the right approach?

Regards Gauri

Upvotes: 1

Views: 770

Answers (2)

NicoPaez
NicoPaez

Reputation: 436

Regarding question (4): what you say is correct, but you could improve the execution time by avoiding closing and opening the browser on each test, for example you could just delete all cookies (depending on the specific case, that could be enough).

In relation with the datasets mentioned by Andrew, in some occasions I use DBUnit to take care of loading the corresponding datasets for each test.

In more general terms, I always try to avoid automated tests that hit the web presentation because the tend to be very fragile (minor changes in the UI can make the tests fail) and they are also very costly compared to other kind of tests. I prefer unit-test and under-the-skin tests (just below the presentation, like hitting the REST API).

Upvotes: 0

Andrew Regan
Andrew Regan

Reputation: 5113

This is a very broad topic, but from my experience anything that works over HTTP can be very effectively automated. That covers HTML, Javascript, and CSS, in mainstream browsers - and with the right tools and libraries in Java you can cover all the related technologies like HTTP(S), XML, JSON, YAML, FTP, SMTP, SSL, not to mention JDBC et al.

All sorts of combinations of unit-test runners, end-to-end test runners, and other frameworks can be combined with Cucumber (et al) for BDD, with Jenkins (et al) for CI and automated/overnight testing, against local browsers, local Grids, and cloud-based Grids.

The most important asset of all is a highly experienced web-developer with an understanding of the full stack, (at least) from HTTP upwards. Teaching them WebDriver should complete their knowledge and allow them to be able to come up with automation solutions for almost/all your needs.

So in answer to your questions:

  1. You can. Hopefully the above helps. The afore-mentioned web developer with JavaScript, a full Java stack, and WebDriver should be fine. AngularJS is particularly well-covered, but ExtJS too, and any native JavaScript can be run.
  2. With your full stack and control over a client browser, you have the best of both worlds. You can emit waits at all levels: scheduled tests, client-side waits, etc.
  3. Apparently, yes.
  4. That's the simplest case, yes, but as your needs expand, you may want to write code - or choose a framework - that gives you closer control over browser instances to minimise delays. Done properly, this can be extremely efficient. Done badly (or not at all), you can end up with a slow, unscalable mess. Here's a heads-up that for a serious enterprise solution, you will also need to manage test datasets.

Upvotes: 1

Related Questions