Imagine we have framework (any tool or language, BDD, Non-BDD) that both QA and Dev teams are using. Dev team would be writing and executing Unit Test cases and QA Team will be writing functional, Regression, Smoke Tests and executing them.

Questions is now how different their test cases would be? E.g. There is one functionality "User is able to change profile picture".

What would be Dev's automated unit tests and what would be QA's automated functional tests?

Why I am asking because we want no team should spend different time/effort on same thing. Even if QA team is writing both Unit and Functional tests they know the difference and assign Dev team to execute them.

1 Answer 1


User is able to change profile picture.

Dev's automated unit test:

  • As its name suggests, unit test is normally a functional test of a single function, e.g. test against a unit to a bigger picture.
  • User is able to change profile picture may consist of a number of functions (units), for examples: a function that receives a mouse click from a user and passes on this clicking action to a function that scans a folder for all available user pictures. Both of aforementioned functions will be tested independent of each other.
  • In general, a unit test is a type of white box testing, devs know their own functions inside out; they cheat-testing their functions on the most basic level, using raw data (for example, a flag variable to represent a mouse click) as test inputs and test results of unit tests are normally raw data too.

QA's automated functional test:

  • The subject under test for QA is normally not a function, testings carried out by QA are normally black box testing in nature, e.g. QA do not have knowledge on function level and they have no access to source code, they QA test is a product of some kind.
  • QA pretend to be end-users, they develop automated tests to mimic real life scenarios. They can use Selenium to mimic a mouse click on a real button to initiate a change in profile picture. QA testing is of a higher level than unit testing.

In conclusion:

  • There is no absolute black-white boundary between dev's automated tests and QA's automated tests.
  • There is nothing stops dev's from developing end-user and black-box automated tests, in industry, occasionally, devs do do this; I have met QA performing unit tests as well.
  • The reason why devs focus on unit testing and QA focus on end-user scenario testing is that it is usually natural, convenient, efficient and comfortable for them to follow such a workflow; devs know their codes the best, they can apply unit tests faster and better while QA take care of the assembled product. Of course, if in a certain contextual environment, when we will be better off to have devs do end-user testing and QAs do unit testing, I am sure people will adapt it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.