Hello friends and greetings for the day welcome back to another tutorial on istqb Foundation level certification we are in Chapter 2 talking about testing throughout the sdlc and uh still continuing with 2.2 that is test level and test types as a part of this particular segment today we'll be continuing with 2.2.2 that is test types and we will be talking about white box and blackbox testing [Music] well today we are talking about something very very crucial because most of the world and entire QA Community almost most of them are pretty confused with this particular topic many times when I do sessions and ask people and this quick question that hey what do you mean by white box they say it's a type of unit testing or sometime people say that white box is type of unit testing or unit testing is a type of white box and that's how they classify and remember what is white box testing but let me tell you very clearly today that there are no such classifications these are two independent approaches and can be used at any particular level if you want you can do unit testing with white box or if you want you can do system testing with white box but it's just not efficient enough and that's where we have some best practices what we are following today and we use white box mainly for unit testing as of now and most of the non-functional levels yes you must be getting surprised to know that it's not that unit testing is restricted to white box level or being used as a white box testing approach but all the non-functional testing or most of the non-functional testing is used or conducted by using white box testing approach so let's Deep dive into this and try to understand more about that what is the difference between these two approaches and how this is applicable to any particular level which we conduct in testing so the very first thing we're talking about is white box testing white box testing is a structure-based and derives test from the systems implementation which is basically the code or internal structure which includes the code architecture workflows data flows Etc the main objective of white box testing is to cover the underlying structure by the test to the acceptable level now in simple words all we are trying to say that assume that there is a person who is working in the organization and trying to test the system if this person has a very good understanding of what is code what is the program what is the architecture and what is the workflow behind the screen and in order to test this this person will certainly prefer working on the back end that is at the code level and run the code to see the desired output because it's convenient for this person to go and execute a code and at the same time it would be very fast for him or her to quickly fix a bug if the deviations are observed so we don't don't really have to wait for someone to understand our effect or kind of like you know explain a third person that what could be wrong how to reproduce a effect and so on so in white box testing it becomes pretty much faster but again I can talk about simple programs like unit the smallest piece of code which I can test at a time of course these are not recommended at a very huge level like system level or acceptance level but it's not restricted that means it's not necessary that you can only use it at unit can't use it at integration but for example if I talk about API testing which is interfaces uh application programming interfaces I certainly go with white box right and many of non-functional do make use of it so it's just an approach if you're testing on the back end at the code level by executing the code and looking for the desired outputs you call it as white post testing approach on the other hand we do have another approach called as blackbox and when it comes to the blackbox test approach we talk about it is based on the specification based and derives test from documentation external to the test object which is more of like requirements business model use cases Etc the main objective of blackbox testing is to check the system's Behavior against its specification and again this is generally being conducted by the tester so the very important and most common points here is to talk about that black box testing is something which happens without the knowledge of the backend code so say in simple words if I'm a person who's trying to conduct testing on a system but I don't have zero knowledge on coding and programming or internal architecture of the system now if in case I'm supposed to test it I would certainly prefer a front-end approach which is a UI specific approach like a user I'll try to interact with the system enter the desired inputs and look for desired outputs by clicking buttons and this this Behavior certainly is referred to as blackbox because you are just limited to the external boundaries of the body right and in that case this is something which is limited to people who are test Engineers because generally we say that user perception is equally important however the approach is slightly different here here it may take other way around a little longer to fix the defects it may take little you know longer to explain someone that what did you find as a tester in terms of defect and then developer will work on it you have a longer turn around time and so on so forth but the most important thing here is the biasing that two people are different not the same person is trying to test and at the same time user perception is equally important if I don't work on the front end it may not fulfill the needs of the user interface or the expectation of the user needs in that context both the approaches are very much standing at their own place if you have a question in your mind that which one is the best best then answer is both of them but of course best applicable at some typical levels right so generally system testing and acceptance testing are conducted using blackb testing and that's very common approach to be used but when it comes to non-functional as I told you we prefer using wbox because there we don't worry about UI but we are more worried about architecture and interactions in that context blackbox is again not limited to system if you also want you can do it at acceptance and few other non-functional level like usability okay usability does not get into the hardcore coding so put together these are the two uh approaches what we wanted to talk but before we wind up we also have a quick note for you to remind you and summarize that all the four above mentioned which means the functional nonfunctional white box and black box these test types can be applied to all test levels although the focus will be different at each level different test techniques can be used to derive test conditions and test cases for all the mentioned test types so this is what I was trying to convey you that they are not restricted it's not a hard-coded classification that this would fall under this particular level and that would fall under this particular level no any of these approaches any of these functional and non-functional test types can be used at any level be unit testing integration how is that even possible for example a performance test engineer can always join unit testing and start reviewing the code in terms of identifying the memory leaks or wild pointers or things like variables which are defined but never used or variables which are used but never sorry declared but never used and things which are used but not declared so these all turn on to the degrading of the performance so performance testers do not wait for the system to be ready in order to get started of course the executions will happen after system testing but the kickoff can happen right at the beginning itself so that's how it makes a lot of sense also to add another important keynote here which I experienced in my journey so far there are no other colors in testing except white and black okay we don't have gray box testing we don't have red box blue box yellow box the internet is filled with a lot of information which does not make any sense okay these are all internal naming conventions of different organizations as for the standard we do not have anything beyond White white and black okay so that's all from this particular tutorial team should you have anything else feel free to comment below I'm always there to address your queries and answer them well till then keep learning keep exploring keep understanding the context thanks for watching the video team and happy [Music] learning