Junior
Do you know any types of testing?
sobes.tech AI
Answer from AI
Yes, I know.
Main types of testing:
-
Functional testing:
- Smoke Testing
- Sanity Testing
- Integration Testing
- System Testing
- Regression Testing
- Acceptance Testing - including alpha and beta testing.
-
Non-functional testing:
- Performance Testing - includes load, stress, and volume testing.
- Security Testing
- Usability Testing
- Compatibility Testing
- Reliability Testing
- Accessibility Testing
- Localization Testing
- Internationalization Testing
-
Change-related testing:
- Smoke Testing
- Regression Testing
-
Structural testing (based on code):
- Unit Testing
- White Box Testing
-
Experience-based testing:
- Exploratory Testing
- Checklist-based Testing
- Scenario-based Testing
Examples of application of some types:
| Testing Type | Brief Description | When Applied |
|---|---|---|
| Smoke Testing | Checking main functions after build or deployment. | Each new build. |
| Regression Testing | Checking that changes did not introduce new defects into existing functionality. | After each change or defect fix. |
| Load Testing | Checking system behavior under expected load. | Before commissioning, during architecture changes. |
| Unit Testing | Testing individual components or code modules. | During development, by developers. |
In test automation, we most often automate regression tests, integration tests, and sometimes performance and security tests.
// Example of Unit tests (JUnit)
public class Calculator {
public int add(int a, int b) {
return a + b;
}
}
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class CalculatorTest {
@Test
void testAdd() {
Calculator calculator = new Calculator();
assertEquals(5, calculator.add(2, 3), "Adding 2 and 3 should be 5");
}
}
# Example of Selenium Webdriver test (Python)
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.google.com")
print(driver.title)
driver.quit()