Sobes.tech
Junior — Middle

What types of testing, besides endpoint verification of APIs, have you usually performed?

sobes.tech AI

Answer from AI

Besides testing API endpoints, I usually performed the following types of testing:

  • Unit Testing — checking individual functions or methods for correctness.
  • Integration Testing — testing interactions between modules or components.
  • Functional Testing — verifying business logic and application functionality.
  • Performance Testing — assessing response speed and load.
  • Security Testing — checking for vulnerabilities like SQL injection or XSS.

Example of a simple unit test in PHP using PHPUnit:

use PHPUnit\Framework\TestCase;

class CalculatorTest extends TestCase {
    public function testAdd() {
        $calc = new Calculator();
        $this->assertEquals(4, $calc->add(2, 2));
    }
}