Testing, Testing, and More Testing
Hello, lovely readers of our Medium. It’s Danin again, and today I’m going to be talking more about tests! If you haven’t read my first article on Test Driven Development, you can do so here:
So what more is there to test? Well, among the many tests there are out there, I’m going to be talking about Mock Testing, Stub Testing, Stress Testing, and Penetration testing.
Mock Testing
“To mock” means to imitate. So mocking is basically creating an object that simulates the behavior of a real object.
Here’s an example of our implementation:
Stub Testing
Stub testing is actually not far different from mock testing. The test stub itself actually simulates the software behavior of a process. Usually it returns a fixed answer, and doesn’t respond to anything outside of the test.
Here’s an example of our implementation:
Stress Testing and Penetration Testing
Different from mock and stub testing, these two styles focus more on the integrity of the code we make. Stress testing tests out the stability of our code, and how it performs under abnormal circumstances.
Why we stress test can be summarized into these points:
- To understand the breaking point of our program
- To test how stable our program is given nonstandard usage
- To determine how our system fails
Penetration testing is the practice of finding out the system’s vulnerabilities by ethical hacking. The purpose is to find out weak spots we may have missed during the development stage and work to fix them.
Penetration testing can be divided into several steps:
- Planning
- Scanning
- Gaining Access
- Maintaining Access
- Analysis
Our implementation has only been an analysis of possibilities that may happen by rechecking the tests.py code alongside the gitlab runner.
That’s pretty much it. There are way more tests out there that we can try to implement in our project, but let’s leave that for another time, shall we?
I hope you learned something from this. Until next time.