BaseTest class in Data Driven Framework | Selenium Forum
M
Posted on 02/11/2016
Hi Sir,

In the Data Driven framework we are making BaseTest class which will have common functions and other classes will be extending the BaseTest class.

If in the interview when we explain our framework they ask that we go for inheritance when there is a "IS A" relationship. All the classes "IS NOT" a BaseTest class, I mean there does not seem to be "IS A" relationship when other classes are extending the BaseTest class.

Kindly suggest what answer can be given in this case.

Thank you for the help!

M
Replied on 03/11/2016

can repeat the question?


M
Replied on 09/11/2016

Hi Sir,

In the Data Driven framework we are making BaseTest class which will have common functions and other classes will be extending the BaseTest class.

As per concept, we go for inheritance when there is "IS A" relationship between the classes. For ex: If we have class car and class vehicle then car class can extend vehicle because car "IS A" vehicle.

When we are extending the BaseTest class in framework, the other class contains functions from BaseTest class but does not have "IS A" relationship with BaseTest.

so, in interview if we are asked about this then how can we answer.

Request you to please help.

Thank you.


M
Replied on 10/11/2016

[quote:28qf2ufs]When we are extending the BaseTest class in framework, the other class contains functions from BaseTest class but does not have "IS A" relationship with BaseTest.

so, in interview if we are asked about this then how can we answer.[/quote:28qf2ufs]

if you check carefully there will be a "[color=#FF0000:28qf2ufs]IS A[/color:28qf2ufs]" relationship.