A
A
akon19822017-03-29 16:53:00
PHP
akon1982, 2017-03-29 16:53:00

How to test the site automatically with a notification when the test fails?

Good afternoon. Tell me, please, how to organize testing of a site written in PHP (for example, on Bitrix)
I develop and maintain several sites alone. At the moment I have tests on SELENIUM IDE (add-on for Firefox). They check the presence on some pages of the site (a working site. As far as I understand it is called in production) of some html tags, the values ​​of their attributes, etc. But you have to run these tests manually.
I also installed Сodeception on the local computer. I like him more. But I don’t know - is it possible and good to keep codeception on a working site? Despite the fact that I will not test some things that make changes to the MySQL database.
And I would like the tests to be launched somewhere with a certain specified frequency and speed, to check the working site (production). And if some test is failed - a message would be sent to email. Or in some other way I would have been notified of a failed test.
How can this be organized? Or where can I read about it?
PS Just in case, I will mention that I use HG on my local computer. I make commits. And periodically - push to Bitbucket. But I upload files to the site simply via SFTP.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Konyukhov, 2017-03-29
@heahoh

It would be more correct to test a local copy of the site before rolling out changes to production - thus you will save yourself from the danger of making changes to the database and you will be able to more fully conduct acceptance tests. You can also get rid of the problems of false positives due to network errors.
Look towards CI - according to the schedule, a separate container will be created (OS + amp + codeception), the project will be unloaded from CVS, the current version of the database will be uploaded, tests will be run and, if they are successfully passed, upload changes to prod

A
AlexKuznec, 2017-03-29
@AlexKuznec

Like it would be possible to do imitation of requests. I didn’t find it on the go in Google, but something like that came across, it seems, in phpMyAdmin. In Yii2, I also saw some parameters about imitation. I would dig in that direction.
Theoretically, it is possible to do it manually through transactions with mandatory rollbacks, and in case of abnormal execution, send yourself a letter with an error. And nothing will change in the database)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question