Middle
You write automated tests in Java, correct?
sobes.tech AI
Answer from AI
Yes, I write automated tests in Java. I usually use tools like JUnit or TestNG for organizing tests, and for UI automation — Selenium WebDriver.
Example of a simple test in JUnit:
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class SampleTest {
@Test
public void testSum() {
int a = 2;
int b = 3;
assertEquals(5, a + b, "Sum should be 5");
}
}