A
A
Anton2020-01-09 21:39:13
JavaScript
Anton, 2020-01-09 21:39:13

Is it possible to test the site in automatic mode?

Is it possible to test the site in automatic mode according to this algorithm:
At some point, a script is launched, probably from another server, which should do the
following
: send different forms on the site (call back, pre-order...)
- flip through the photo in the gallery
- open the page, determine if the pictures have loaded, if the layout has gone wrong...
In other words, the script should do the same thing that a person usually does on the site .
If the test fails, send an email to the admin.
==
The task stems from the fact that the form on the site suddenly turns out to be not working, and no one knew, or there is a glitch that did not allow removing goods from the basket and, again, no one knew.
It is clear that the developer (tester) and the client must check how this or that works and whether it works at all, but the customer asks me - is it possible to make such a "script"?
And I have a question - if possible, how is this implemented, because I have a bad idea of ​​​​this:
a. Many glitches may not be server-side, ie. It could very well be a Javascript bug in the browser.
b. Even if such a script is possible, in my opinion, it will be very difficult to "teach" a behavioral factor, for example, filling in the fields in a certain order, bypassing Captcha, entering promotional codes, setting a commodity quantity.
in. And I absolutely don’t understand - how can you determine if the layout has gone wrong?
If this is extremely difficult or impossible, then how to correctly convey to the customer that this cannot be implemented?
Added:
A big plus of the solution will be: periodic launch without human intervention and with notification by mail.

Answer the question

In order to leave comments, you need to log in

10 answer(s)
S
Sergey Gornostaev, 2020-01-09
@anton99zel

Yes, it's possible. This is exactly what Selenium was invented for.

S
Saboteur, 2020-01-10
@saboteur_kiev

a headless browser, such as chromium, is launched from the command line, various options are prescribed for what it should do and what the result should be.
Scripted and run automatically.
You can use something more complicated, like Selenium.
Well, in general, QA automation engineer, there is such a thing.

B
bioroot, 2020-01-16
@bioroot

Didn't see it in the answers above, so I'll put in my 5 cents. Look towards Cypress . Surprisingly cool and for some reason not very well-known thing. This is such a combine, in which the best js testing solutions are crammed, good documentation, jQuery support. It has a low entry threshold. You don't need to set up anything special. Installed and let's go. And one of the main bonuses is that tests are launched in a very presentable form. Roughly speaking, the selected elements are highlighted in your browser window and, in parallel, the test execution logic is shown next to it. So now when the boss asks "What are you guys doing here anyway?" he always has something to show.

L
Lynn "Coffee Man", 2020-01-09
@Lynn

Another option https://yandex.ru/dev/hermione/

R
Ruslan Polin, 2020-01-10
@Veleses

Yes, it's possible. We use this thing: codeception

V
Vitaly Karasik, 2020-01-10
@vitaly_il1

There are two options - as mentioned above, you can write tests and run them with selenium and all sorts of tools based on it.
The second option (if the site is public) - using transaction tests ( https://tools.pingdom.com/, https://www.site24x7.com/ etc. ) you can record and run such test scripts automatically without any programming.

P
Phoenixsma, 2020-01-16
@Phoenixsma

If you don’t need to test cross-browser, but one chrome is enough, then there is nothing better than puppeteer. This is a Google native project, so in terms of efficiency and ease of working with chrome, not a single selenium or something else comes close. Plus, it is excellent friends with typescript, which is important in our time. As a test runner, I recommend jest, everything is there "out of the box", plus, again, typescript and is perfectly screwed to puppeteer, there are special libraries. Further Jenkins or something else - it doesn't matter, it's a matter of habit.

J
johnwolf, 2020-01-16
@johnwolf

To write autotests, you can use chromedriver or Puppetter
Ready-made docker container with chromedriver: https://github.com/yukinying/chrome-headless-brows...
Examples of using Puppetter: https://developers.google.com/web/tools/ puppeteer/...
Or you can use services where you can use the environment with ready-made integrations, for example, with mail, telegram and sms. With scheduled launch and notification: https://docs.testoid.io/guide/email/

E
Eugene, 2020-01-16
@Jek_Rock

There is also such a service as screenster for automatic UI testing of web applications. There, knowledge of Selenium is not needed, you just write down your actions, and then it runs tests based on what you wrote down

A
Aleksei Podgaev, 2020-01-19
@alexiusp

Do not under any circumstances start using selenium! These are solid brakes and glitches. Take better Cypress mentioned above. It is not buggy and faster, and tests for it are written in JS with the usual syntax as in Jest / Mocha.
We have implemented automatic launch with email notification through Jenkins.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question