Hello all welcome back to the next one. In this one, we will continue our discussion about strategic grouping. So let me bring up Eclipse, the class stays the same, there's nothing else that I'm going to change in the test class, there's something that I'm going to change in the XML file. So till now we saw that under the group's tab, sorry, under the group's tag, we can include a run tag, and we can include what group we want to run. Since it's a group's tag, we can actually have multiple groups defined under Right, right. And then there should be something that we can choose which group we want to run, instead of saying, the group name here directly.
So let's see how we can achieve that. Instead of putting these things into the run tag. What we can do here is we can define, define tag so the tag name is define and we can name it something so let's say I'm going to name it all let's just name it all. And so now we have a define tag. Instead of putting this thing here, I'm just gonna put it under the Define tag. And here let me include a couple of more groups.
So I can say other than by x, I can say SUV. And since it's all group limit, just include the group for sedan also. And we have a cars group also, but if we cover SUV, if we cover sedan, and bikes, we pretty much cover all of them, right? So we can define one group like that. We can also define another group here. So let me just copy everything.
And let me just call it as maybe SUV and sedan. So and then we can name it Something like cars. Why am naming it as cars because all I did is I included SUV and sedan, but I skip bikes. So it's as good as using the group cars, but just wanted to use multiple groups. That's why I named it as cars and included a Sylveon sedan. And that's about it.
So now we have two different groups and which includes two different combinations right. Now under the run tag, what we can do here is we can include and in the name, we can say, I want to run all so now this name is this guy, or this guy, and this name, or maybe you know what, I should name it as no bikes, because I don't want you to get confused with this cars name. So just to make Make sure that this name is completely different from what we have used in the code file. These names are the same as code files. But the one that we are defining here, it's completely different. So what I've done here is I have defined a run tag and in that I've included all which is this one.
And that's about it. So let me just right click this XML file and run it as a test in G Suite. And let's see the output. So what it does is it ran everything rd ethics BMW xx, Honda CBR Kawasaki Ninja, because we ran all the test cases. Now if I say no bikes here, then save it and run it as test in G Suite. Then it only ran the cars test cases, RDS x and BMW xx.
And it did Not run the bikes test cases. The reason is I did not change anything, I'm only updating the run tag with what group I want to include. And everything is upset here, right? The only thing I changed here is this one, and it's working perfectly fine. So this is a really good way to group our test cases to actually run, which test cases we want to run. And you can have multiple XML files created for separate groups.
So if you want to run a particular group of test cases, you can run that XML file, and it just makes it super easy to manage. So that's about it. Please practice this one. You can always download the code files, I always update them, upload them with the lecture. And let me know if you have any questions. I'll be more than happy to help you.
I'll see in the next lecture guys. Thanks for attending this one. Thanks.