我有两个班的父母/孩子。我正在运行TestNG测试,并且作为父类中创建的@BeforeTest批注的一部分,并继承了该类。现在,在子类CLASS级别创建父类的对象引用是一种好习惯吗?
public class studentMembershippageTest extends studentMembershipRepo {
WebDriver d ;
studentMembershipRepo SMR = new studentMembershipRepo();
studentMembershipPage SMP = new studentMembershipPage(d);
}