Junior — Middle
Have you automated testing in your previous company?
sobes.tech AI
Answer from AI
Yes, in my previous company I participated in test automation. We used tools for writing unit tests in C/C++, such as Google Test (gtest). This allowed us to automatically verify the correctness of functions and classes after code changes.
Example of a simple test with Google Test:
#include <gtest/gtest.h>
int Sum(int a, int b) {
return a + b;
}
TEST(SumTest, HandlesPositiveInput) {
EXPECT_EQ(Sum(2, 3), 5);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Test automation helped quickly identify errors and maintain code quality.