{"id":97277,"date":"2020-10-17T08:42:33","date_gmt":"2020-10-17T06:42:33","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy"},"modified":"2020-10-17T08:42:33","modified_gmt":"2020-10-17T06:42:33","slug":"ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy","title":{"rendered":"I automated the testing of Dr. Web. Can you?","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/cd8ba23352d20a2f3ee2cb14f8d2808c.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>I've never used Dr. Web. I have no idea how it works. But that didn't stop me from writing a number of automated tests for it (only my laziness prevented me from writing a hundred more):<\/p>\n<p><\/p>\n<ol>\n<li>Dr. Web Installation Test;<\/li>\n<li>Test for restricting access to removable devices (USB flash drives);<\/li>\n<li>Test for access control to a directory between programs;<\/li>\n<li>Test for access control to a directory between system users (parental control).<\/li>\n<\/ol>\n<p><\/p>\n<p>Such and many other tests can be churned out like hotcakes, not just for Dr. Web and not just for antivirus software. In this article, I will explain how to do this.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h1 id=\"podgotovka\">Preparation<\/h1>\n<p><\/p>\n<p>For the tests, we will need a virtual machine running Windows. I prepared it manually by performing the following actions:<\/p>\n<p><\/p>\n<ol>\n<li>I installed Windows 10 Pro x64;<\/li>\n<li>During the installation, I created the main user \"testo\" with the password \"1111\";<\/li>\n<li>I enabled auto-login for this user;<\/li>\n<\/ol>\n<p><\/p>\n<p>To automate the tests, I will use the Testo platform. You can read about what it is and how to use it <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/testo_lang\/blog\/521682\/\">here<\/a><\/noindex>. Right now, we need to import the ready-made virtual machine into the automated tests. It's very simple to do:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/459ab271741fdbb95c493387d8de648d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Here it's assumed that <code>\/path\/to\/win10.qcow2<\/code> \u2014 this is the path to the disk of the virtual machine that I prepared manually. This concludes the preparation, and the action begins. <\/p>\n<p><\/p>\n<h1 id=\"test-1---ustanavlivaem-dr-web\">Test #1 \u2014 Installing Dr. Web!<\/h1>\n<p><\/p>\n<p>First, we need to address the issue of transferring the Dr. Web distribution to the virtual machine. This can be done (for example) using a USB flash drive:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/6687c2c8ebd4c7ca793be167faf70048.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>All we need to do is place the Dr. Web installer in the folder <code>${DR_WEB_DIR}<\/code> (the exact value of this parameter will be specified when launching <code>testo<\/code>). And Testo will take care of ensuring that this installer ends up on the USB flash drive.<\/p>\n<p><\/p>\n<p>Now we can proceed to actually writing the test. For now, let's start the test with simple things: we will turn on the virtual machine (it will be off after creation), wait for the desktop to appear, connect the USB flash drive, and open its contents using Explorer:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/7317a1c2696e4f57d76de582aca2337c.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot at the moment of scenario completion<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/0df9ba839339151d2f1858da58bdea95.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Of course, we can run the installer directly from here, from the flash drive. But we'll do it the proper way \u2014 we will copy the installer to the desktop and run the installer from there. How do we copy the file? How would a person do it?<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/21173ae89f3cba9f35e159ccd1e5b175.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot during the file copying process<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/b6d7c699d0c3f480ce46aa66c7b22a5d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>All done, the copying has been successfully completed! You can now close the window with the USB flash drive and remove it:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/126e86eb63dcda235e4f36228849386b.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after closing the explorer<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/004431bb78e1abcef70d6e73804e6fa1.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now that the installer is on the desktop, we need to double-click on it to start the installation process. The installation itself involves simply clicking buttons and checking boxes, which is not very interesting:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/ed412bb89bf5a805e76cf6d3c7020d3d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot at the end of the installation<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/b402a56b54c60b88108e1152b83502e4.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We finish our test with a reboot. And in the end, let's not forget to check that the Dr. Web icon appears on the desktop after reboot:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/06ff13e1e29546a904744b6efd29338e.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after reboot<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/eb9ce4edc8807c6fa09f23d308d83c85.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Great job! We have automated the installation of the Dr. Web antivirus! Let's take a short break and see how it looks in action:<\/p>\n<p>\n<center><div class=\"youtube-placeholder\" data-id=\"iCvZOqUsOR8\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/iCvZOqUsOR8\/hqdefault.jpg\" alt=\"Play video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p>\n<p>Let's move on to feature testing.<\/p>\n<p><\/p>\n<h1 id=\"test-2---ogranichenie-dostupa-k-fleshkam\">Test No. 2 \u2014 Limiting access to USB drives<\/h1>\n<p><\/p>\n<p>The first feature on the list is limiting access to USB drives. For this, we will plan a rather straightforward test:<\/p>\n<p><\/p>\n<ol>\n<li>We will try to insert a USB flash drive and create an empty file on it \u2014 that should work. We'll remove the USB drive;<\/li>\n<li>We will enable the removable device blocking in Dr. Web Security Center;<\/li>\n<li>We will insert the USB drive again and try to delete the created file. The action should be blocked.<\/li>\n<\/ol>\n<p><\/p>\n<p>Let\u2019s create a new USB flash drive, plug it into Windows, and try to create a folder. What could be simpler?<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/11408f0b69f7278c6d901c4b0aff342f.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot at the moment of scenario completion<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/bfc6c538f56da309ffdfa9deb085a758.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We create a new text file through the context menu of the explorer:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/dce736a0cbc563d14c261d37ace3dde3.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after renaming the file<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/00fedaf9f0fb0f43e143a563ea0ae3dc.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We safely disconnect the USB drive:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/f3d558f92c925ed5ca72263ebf2c3c4a.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now we have confirmed that we can work with the USB drive, so we can proceed to block it in the Dr. Web Security Center. For this, we first need to open the Security Center:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/b3c59a616b76360af52735a2611a9e6d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot of the Security Center window<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/f79d628bf2455e4fdc6fe03174f83e66.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We can notice that opening any application in Windows requires essentially the same steps (clicking on the search bar, waiting for the popular applications window to appear, typing the name of the desired application, waiting for it to show up in the list, and finally pressing Enter). Therefore, this group of actions can be highlighted in a macro <code>open_app<\/code>, where the name of the application to be opened will be passed as a parameter:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/fcae57d425f1c4178a611ce2ec129e88.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>This macro will come in handy.<\/p>\n<p><\/p>\n<p>The first thing we will do when we open the Dr. Web Security Center is to enable the ability to make changes:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/cd8bc00ec10cad11fdafa83fcc4df668.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now let's click through the menus a bit and go to the menu \"Configure device access rules\". In this menu, we will check the box for \"Block removable media.\"<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/9b626e3d199599669e9bb9df30ded243.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot of the Devices and Personal Data window<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/ed9d278f1d868a18065f8ebfb28c1702.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Let's try to open the flash drive now:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/5812de55f21a1685f8270947bcaca537.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot of the error message<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/75f9266c521ea98d207a5426ed81401e.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>This way, little by little, we've written our first test for testing a quite tangible feature in Dr. Web. It's time to take a break and meditate while looking at the results of our efforts:<\/p>\n<p>\n<center><div class=\"youtube-placeholder\" data-id=\"3U46gCti4eE\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/3U46gCti4eE\/hqdefault.jpg\" alt=\"Play video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p>\n<h1 id=\"test-3---razgranichenie-dostupa-k-katalogu-mezhdu-programmami\">Test No. 3 \u2014 Access Restriction to Directory Between Programs<\/h1>\n<p><\/p>\n<p>The main idea of this test case is to check how Dr. Web functions when access to a certain folder is restricted. Specifically, we need to protect the folder from any modifications, but add an exception for a third-party program. The test itself looks as follows:<\/p>\n<p><\/p>\n<ol>\n<li>We will install a third-party program on the OS, for which we will later add an exception for access to the protected folder. Today's third-party program of the day is the file manager <noindex><a rel=\"nofollow\" href=\"https:\/\/freecommander.com\/\">FreeCommander.<\/a><\/noindex>;<\/li>\n<li>We create a folder with a file that we will protect at all costs;<\/li>\n<li>We will open the Dr. Web security center and enable protection for this folder;<\/li>\n<li>We will configure an exception for FreeCommander;<\/li>\n<li>Let's try to delete the file from the protected folder in the usual way (through Windows Explorer). It should not work;<\/li>\n<li>Let's try to delete the file using FreeCommander. It should work.<\/li>\n<\/ol>\n<p><\/p>\n<p>Phew, a lot of work. The sooner we start, the sooner we'll finish.<\/p>\n<p><\/p>\n<p>The first step, installing FreeCommander, is not much different from installing Dr.Web. The usual routine: we plugged in the flash drive, launched the installer, and so on. Let's skip this and go straight to the interesting part. <\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">If you're still curious about how to install FreeCommander:<\/b><\/p>\n<p>Let's start simple: we will create a flash drive where we will place the FreeCommander distribution, and then in the test, we will insert the flash drive into the OS and open it:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/b452ee156a061c411d4f164bb016d164.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Next, a few clicks to start the installation:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/8b0289bc28fc39391ac51d84d711b927.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>The installation isn't very interesting, we just click \"Next\" everywhere, and at the end, don't forget to uncheck the options for viewing ReadMe and starting FreeCommander immediately.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/393e64ce7a1d85ff3114f2b8c35e5f60.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We end the test by closing all windows and removing the flash drive.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/120db0352891f85f302d1ac68ac31449.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Done!<\/p>\n<p><\/p>\n<p>To work with Dr. Web, let's create a new test <code>dr_web_restrict_program<\/code>, which will rely on the results of the previous test. <code>win10_install_freecommander<\/code>.<\/p>\n<p><\/p>\n<p>Let's start the test by creating a folder named Protected on the desktop:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/e18851a3a3a682181cc043166f3c1e5d.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after creating the folder<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/9242c23d9a004bd138258f0c7382e165.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>We enter the Protected folder and create a file there: <code>my_file.txt<\/code>, which will act as the protected file:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/979003175949e53f53375649288bf683.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Oh, I should have also formatted this as a macro, but oh well ...<\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after creating the file<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/e3aba3f331118e4bd027d691cac8dcb1.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Great, now we need to enable folder protection. We go down the familiar path and open Dr. Web, and don't forget to enable the modification mode. After that, we go to the menu \"Data Loss Prevention.\"<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/c3dbd033ba0ad398b270f26802ac997b.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot of the Data Loss Prevention window<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/862d927e4f6ef173162559b592730125.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Let\u2019s work a bit with the mouse and add our folder Protected to the list of protected ones:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/3b214048e6399ab666e83c74e9527e58.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot with the wizard for adding a protected folder<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/17d2f8fb46333e97a8fe38fb10b3d04f.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now we need to set up an access exception for FreeCommander. A bit more work with the mouse:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/4399a5fcb91141d3cc6356fce064afc7.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot with the added exception program<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/4c2e872324c074bed930bd3b5a0a2795.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now carefully close all windows and try to delete the file \"my_file.txt\" in the usual way:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/9498c41fa758bd6895f828aa5d217f27.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot with the message from Dr.Web<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/bdbf9de156c774d9e33c2418e5e9e713.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>But it didn\u2019t work \u2014 it means Dr. Web actually did its job! Half of the test is done, but we still need to check if the exception for FreeCommander will work. To do this, we open FreeCommander and go to the Protected folder:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/c343e26f449d1c15859e3c118b16a6e5.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot with the FreeCommander window<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/d6468a6442ada3466a90c9a1b1809867.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>Now let\u2019s try to delete the file my_file.txt:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/73aa49420b3626e07dcda7693f356796.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>                        <b class=\"spoiler_title\">Screenshot after deleting the file<\/b><\/p>\n<p><img decoding=\"async\" alt=\"I automated the testing of Dr. Web. Can you?\" src=\"\/wp-content\/uploads\/2020\/10\/892ddfb7b8c80ed7e30ae77006877635.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>The exception for FreeCommander works!<\/p>\n<p><\/p>\n<p>Great job! A big and complex test case \u2014 and everything is automated. A bit of relaxation:<\/p>\n<p>\n<center><div class=\"youtube-placeholder\" data-id=\"xXIGR2PegW4\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/xXIGR2PegW4\/hqdefault.jpg\" alt=\"Play video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p>\n<h1 id=\"test-4---roditelskiy-kontrol\">Test \u21164 \u2014 Parental Control<\/h1>\n<p><\/p>\n<p>We will build the last test case of the day as follows:<\/p>\n<p><\/p>\n<ol>\n<li>Create a new user MySuperUser;<\/li>\n<li>Log in as this user;<\/li>\n<li>Create a file <code>my_file.txt<\/code> on behalf of the new user;<\/li>\n<li>Open the Dr. Web security center and enable parental control for this file;<\/li>\n<li>In parental control, limit the permissions of the user MySuperUser for the file he created;<\/li>\n<li>Try to read and delete the file <code>my_file.txt<\/code> on behalf of MySuperUser and see the result.<\/li>\n<\/ol>\n<p><\/p>\n<p>I won't provide the test scenario here. It follows the same principle as the previous tests: actively working with the mouse and keyboard. Meanwhile, we don't care what we are automating \u2014 whether it's Dr.Web or creating a new user in Windows. But let\u2019s see what such a test run will look like:<\/p>\n<p>\n<center><div class=\"youtube-placeholder\" data-id=\"ShERSuzdnV4\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/ShERSuzdnV4\/hqdefault.jpg\" alt=\"Play video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p>\n<h1 id=\"zaklyuchenie\">Conclusion<\/h1>\n<p><\/p>\n<p>\u2192 You can view the sources of all tests <noindex><a rel=\"nofollow\" href=\"https:\/\/gist.github.com\/log0div0\/c23551fdc3b6b68551024421d9fbebd8\">here<\/a><\/noindex><\/p>\n<p><\/p>\n<p>Moreover, you can run all these tests on your machine. For that, you will need the Testo test scenario interpreter. You can download it. <noindex><a rel=\"nofollow\" href=\"https:\/\/testo-lang.ru\/ru\/downloads\">here<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Dr. Web turned out to be a decent training experience, but I would like to draw inspiration for future endeavors from your wishes. Please write your suggestions in the comments on what automated tests you would like to see in the future. In the next article, I will try to automate them, and we'll see how it goes.<\/p>\n<p>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/testo_lang\/blog\/523496\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u042f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Dr. Web. \u042f \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e, \u043a\u0430\u043a \u043e\u043d \u0443\u0441\u0442\u0440\u043e\u0435\u043d. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u043b\u043e \u043c\u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0440\u044f\u0434 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432 (\u0438 \u043b\u0438\u0448\u044c \u043b\u0435\u043d\u044c \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u0430 \u043c\u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0451 \u0441\u043e\u0442\u043d\u044e \u0434\u0440\u0443\u0433\u0438\u0445): \u0422\u0435\u0441\u0442 \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Dr. Web; \u0422\u0435\u0441\u0442 \u043d\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u044a\u0435\u043c\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c (\u0444\u043b\u0435\u0448\u043a\u0430\u043c); \u0422\u0435\u0441\u0442 \u043d\u0430 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438; \u0422\u0435\u0441\u0442 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":97278,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-97277","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u042f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Dr. Web. \u0410 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b? | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-10-17T06:42:33+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-10-17T06:42:33+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47I automated the testing of Dr. Web. Can you do it? | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u042f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Dr. Web. \u0410 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b? | ProHoster","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/ya-avtomatiziroval-testirovanie-dr-web-a-smozhete-li-vy","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-10-17T06:42:33+00:00","article:modified_time":"2020-10-17T06:42:33+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"97277","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 10:23:46","updated":"2022-10-03 07:14:50","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/97277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=97277"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/97277\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/97278"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=97277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=97277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=97277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}