Now instead of manually checking the response code in authenticate step we can even make use of response assertion
In a reponse assertion there are 3 main field to look into
So we can use this response assertion in a few different ways.
We can choose response text from fields to test and then in patterns to test we can then click add down below and then we have to click add from clipboard as we cant type anything here.So first copy paste the response we want to see and add in assertion here .Then we run the Test Plan and if assertion fails it will show in our results tree that assertion has failed.
Then we can even add a new assertion and instead of text response we can choose response code in the field and in pattern add Response Code as 200.And see if assertion passed or failed.
We can even add a listener called Assertion results and check our assertion results there itself.
Similarly we can add a new assertion and instead of test response or response code we can choose response in the header in the field . and on pattern we can add the header from the response
Then we can check if the authenticate step is clicking the right URL using Url Sampled as field in our assertion and providing the relevant url in the pattern
And lastlly we in the apply to section of assertion we can check if we want to apply assertion to Main sample or Sub sample only or both. as in authenticate step we have child samples so we can apply assertion to child samples only as well.