Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ibtdi.com's avatar

Difference between automation testing and phpunit testing

What's the difference between testing using tools like Selenium vs phpunit ?? i can almost test everything using phpunit, like testing small units of code / functions / the whole functionality of a feature and even test if view has some data etc..

so why would i need Selenium ??

second question, what software tester do in a team ? i'm working as a freelance so i never worked with a software tester ? what's his job ? if i can build phpunit tests for the software why companies need them ? what 's different between his tests and mine as a software developer ?

0 likes
1 reply
Sergiu17's avatar
Sergiu17
Best Answer
Level 60

Selenium tests entire flow of a feature from a user perspective. Yes you have a php feature test that may cover it. But let's say on your API, you change an endpoint, you update your api.php file, you update your feature tests, tests are green and you forget to update the endpoint in JavaScript - in this case your app will not work and your php feature tests will not detect the issue, so it has it's own benefits. This is just an example, but there are more reasons to use Selenium.

and as you said: i can almost test everything using phpunit - almost, not everything.

related to software testers - they usually manually test pull requests, approves them, or write feature tests to automate their work :)

Please or to participate in this conversation.