-1

I'm looking for a way to test the different functionality of my JavaEE server application. I first tried to do it with Junit and TestNG, but building the different scenario was too tedious. What i'm searching is a tools that will simulate an user using my server application trough his browser, and then once this scenario is established i could check the output and verify if it's working. Here an exemple:

  1. An user connects to the server, the server application interface is displayed.
  2. He executes the functionality to modify his personal datas
  3. He modifies the different that he want to change.
  4. He saves the modifications.

Then what i want to check is the actual state of the data in the database. What i need is something that will simulate the action he did with his browser like i said above...

I've read different article about different tools that could do the works but i'm not sure because i don't really know what to type in google. I discovered Jmeter (that is not working with my application because of web socket) and the Grinder. The Grinder seems to be interesting but most of the things i've read about refers to it as load testing tools, which is not what i'm looking for. Can someone experienced tells me if i can do what i want with the Grinder ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Omegaspard
  • 1,828
  • 2
  • 24
  • 52
  • 1
    This sounds like an end-to-end integration test. Selenium is a good tool for automating browser behaviour. Paired with a decent build tool, like Maven you should be able to deploy an embedded server, run selenium tests, verify outcomes. – Boris the Spider May 20 '16 at 15:32
  • when you say the outcomes, do you mean html content ? – Omegaspard May 23 '16 at 07:41
  • I mean that a test has 3 phases: setup the initial state, run the test, verify the final state. The final state is then outcome of the test, you need to verify it against your expected state to see whether the test passed. What this outcome is only you can know; files written to hard drive, data in database, content served to user, content request from another source - it can be absolutely anything that a computer can do. – Boris the Spider May 23 '16 at 07:43
  • Your comments really helped me how do i put the green check on it ? – Omegaspard May 23 '16 at 12:47

2 Answers2

1

You can use scripting tools like: Sikuli(Record Playback & Scripting) or Automa (Component Identification Scripting)

Sanjit Kumar Mishra
  • 1,153
  • 13
  • 32
1

The most popular tool currently is Selenium. It will certainly do the job. I would also mention Geb because it provides more convenient API when compared to Web Driver.

I'll also let myself to give an advice, although it doesn't relate directly to your question.

If your project is big enough (4-5 teams over a couple of years can deliver a lot of code), you should think what to automate.

These tests can be very heavy both in terms of CPU load and in terms of time. So if you'll rely ultimately on these tests, your build will run ages and will be potentially unstable.

So these tools should be used only to complement unit/component and integration testing that should exist anyway and they will use completely different tools.

Also in UI, consider using various testing techniques that would test only the UI side (mock the server endpoints and so on).

halfer
  • 19,824
  • 17
  • 99
  • 186
Mark Bramnik
  • 39,963
  • 4
  • 57
  • 97