How to test how your antivirus works safely? You don't have to have a real virus on your computer to test your antivirus!
Everything is virtual
There is one thing to understand in computer science, it is simply that everything is virtual! You only see what they want to show you! If on your screen, it's blue, we can very well make you print in green, without too much hassle! Example that will allow you to better understand: print an animated image (.gif) will give you an inanimate image!
What's my point? Transpose the idea to an antivirus: all the indicators are green and everything shows that it is functional… but is it really? You can also imagine a program that crashes with the image of the program remaining and no error message – unless you use the program, you don't know it's no longer active!
Know this, once in place, some malwares and viruses manage to disable your antivirus and make you believe that it is still active!
How do I check and test that an antivirus is working?
To test an antivirus, there are no 2000 ways: submit a virus to see if it reacts!
But submit a virus to him and if it doesn't work… Rather a bad idea, because in this case, the virus will take the opportunity to settle quietly in your pc!
So how do you do that? By submitting a fake virus to him!
Yes, there is one, the EICAR test file! A quick tour on Wikipedia if you ever want to know a bit more: https://fr.wikipedia.org/wiki/Fichier_de_test_Eicar
In short, EICAR is an independent European antiviral research body. In collaboration with the majority of antivirus vendors, they have developed a detection code considered to be a virus (but completely harmless).
The principle is simple: you download the EICAR file (or you create it yourself), and if your antivirus reacts, everything is OK! Otherwise, well it is completely out of service and you are helpless!
One of the sites where you can have the EICAR file in different variants: https://www.eicar.org/?page_id=3950
Other technique, but that it will compare your antivirus with others: submit your file to several antivirus