Y
Y
Yaroslav2012-07-02 22:10:36
Software testing
Yaroslav, 2012-07-02 22:10:36

How to automatically (CLI) completely simulate a user session?

For automatic testing, you need to repeat a simple routine operation, say (well, an example to make it clearer):
1. Log in to LiveJournal
2. Write a post to LiveJournal
3. Write a comment in some thread
4. Log out

In theory, all this can probably be done through its API or via curl, but here the point is to have the test imitate the user. For example, if suddenly the site adds some hidden field to the form, then it should be sent in the request to the site. Or if it changes the name of the fields, then the script should send exactly these new names of the fields (because the user would do just that, and would not even notice that the name of the field in the form was changed or a new hidden field was added or removed).

It is impossible to count on the fact that the site interface (cookies, form fields, etc.) will not change. The point is to detect such changes by such testing.

That is, in some way, first write a script (in terms of “mouse click at coordinates 50px: 200px”, or “Fill in the X field, fill in the Y field, click submit”), and then execute it. Ideally, it could be executed from the command line (linux). Maybe even some kind of addon for firefox that would launch it, go to the site, fill out forms, send, exit.

Any advice on which way to dig, what more or less similar tools exist?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
avorobiev, 2012-07-02
@avorobiev

From the command line, such tests can be run using www.phantomjs.org , and they will be decoupled from the operating system GUI.
If you don't need page rendering and javascript execution, then a headless browser thread is fine (for example github.com/fabpot/Goutte )

E
egorinsk, 2012-07-03
@egorinsk

This is a problem, everything is bad, everywhere people write something of their own, for example, based on Selenium. If you have many users, it is easier for you to establish feedback and error monitoring, let them test everything for you and report problems for free.

J
javax, 2012-07-02
@javax

sourceforge.net/projects/ljapi/

R
reminded, 2012-07-03
@reminded

We also use Selenium for similar things. In principle, everything suits.
Of the commercial tools with which else there was experience and which support testing through web browser control - this is www.borland.com/products/silktester It really costs a lot of money ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question