What is Unit testing, Black-box testing and White-Box testing? I googled but all the explanation I found was very technical. Can anyone answer this question in a simple way with an appropriate example?
相关问题
- Dependencies while implementing Mocking in Junit4
- How to unit test a reactive component where ngCont
- Access for global variables JavaScript unit testin
- Get access to Angular service instance from JavaSc
- Port of the Rails app when running Cucumber tests
相关文章
- How to replace file-access references for a module
- How to mock methods return object with deleted cop
- What is a good way of cleaning up after a unit tes
-
EF6 DbSet
returns null in Moq - Web Test recorder does not allow me to record a te
- React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- Factory_girl has_one relation with validates_prese
Black Box Testing:
White Box Testing:
Unit Testing:
getGrades
), StudentTest might have 0 or more functions to test them (likegetGradesTest
). This is just one such way to go about it.* The amount of knowledge known between a black box tester and a white box tester varies from organization to organization. For example, what I consider usability testing, another company might call black box testing. A white box tester in some companies might be another developer (developer QA), whereas another organization may not allow any testing sign-offs to be completed by a developer. A black box tester could be someone who just has a list of instructions they need to follow and validate, or it could be someone who generally knows how the system works, but just not at a particularly detailed level. For example:
Essentially, white box and black box testing is rarely implemented strictly. Most organizations have unit tests, developer testing (that may or may not be formally documented - depends upon the implications of a failure), QA testers (black, white, and every shade of gray in between), and user testing / business sign-off (the people who should be involved throughout the project, but in poorly run organizations only show up at the beginning and end, and send a completed project back to design right before deployment).
In black box testing, you don't care how the internals of the thing being tested work. You invoke the exposed API and check the result; you don't care what the thing being tested did to give you the result.
In white box testing, you do care how the internals of the thing being tested work. So instead of just checking the output of your thing, you might check that internal variables to the thing being tested are correct.
Unit testing is a way of testing software components. The "Unit" is the thing being tested. You can do both black and white box testing with unit tests; the concept is orthogonal to white/black-box testing.
A very non technical explaination lacking any details.... Here comes..
Blackbox Testing : Testing an application without any knowledge of how the internal application works
Whitebox Testing: Testing an application with knowledge of how the internal works, such as by having the source code side by side while you are doing your test.
Unit Testing: This is where you create tests which interact directly with your application. You would check a function in your application and
assert
that the response should return withvalue X
. Unit Tests are usually, but not always created by the developers themselves as well, whereas if a company does whitebox and blackbox testing, it can be done by anyone.This is a very basic explaination.
Blackbox Testing: This is always user or client based testing where testing is done based on the requirement provided. This testing is done by testers only.
Whitebox Testing: This is to verify the flow of the code base. Testing the flow of condition statement, loop statement etc. This mainly from developer prospective.
Unit Testing: This is part of white box testing as you test each methods in code with your test data and assert that. Now a days this done by testers and company looks this skill from tester where they are able to understand the code and algorithms.