mardi 21 mars 2017

what deisgn pattern should I be using if I want to run my tests for different countries

DataSheet

Hello,

I'm creating test methods where I has to pass the country, type of product and different combinations of addresses where I populated Billing and Company address

I have to test for 4 different countries and each country has their own unique flow. So I have separate PageObjects for the different countries.

For example AUPageObject, FRPageObject, CAPageObject. java class files

But some the locators and validation messages are same for the different country flows. So I'm thinking I will create a super class where I can put all the common page objects in that superclass ? Is that a good idea ?

For example:

public USPageObject extends AllCountryPageObject {

}

I also have to test all the countries where they can purchase two different product type (a trial product or buy now product). The I have to test with different combination where I have the option to populate or not populate company address. Then with different credit card types.

What is best test design pattern that I should use ?? Should I create an overload constructor for example ?? Any suggestions would greatly help ?

public methodName (newCountry(CountryName), newCardType(Card), boolean isCompanyPopulated, new productType(product))

{

}

Aucun commentaire:

Enregistrer un commentaire