Hi All, I have used travelocity sample application to automate tests for the Open Id, for following parameter combinations.
User - (Admin/Login User/Tenant User) User Consent - (Approve/Approve Always/Skip) Association Type - (DB Store/Replication Store/Crypto Store) OpenId Attribute Exchange - (With/Without) Consumer Type - (Smart Mode/Dumb Mode) Test is being written using @factory annotation along with a TestNG data provider to initiate tests for each parameter combination. In order to specify the consumer type and to specify whether attribute exchange is requested or not I introduced two new properties to the sample app as below. #Specify whether the consumer requests user attributes from the provider OpenId.EnableAttributeExchange=true #Specify whether the consumer runs in dumb mode OpenId.EnableDumbMode=false So for these two properties there are four combinations that I have to test, and I see below two approaches to get this done. 1. Build four artifacts of the sample app for each combination of the two properties. 2. Use the same artifact for testing changing the property file for each combination. I have tried on (1) using maven-war-plugin by adding four executions and labelling each artifact with a classifer. But this approach packages four additional artifacts though we need them only for testing. I'm not sure how can we have those artifacts be packaged only at the test phase. Further there are several ways of using the tomcat instance with the deployed app. 1. Start tomcat before each test and deploy the relevant artifact. Then stop the instance after the test. 2. Start the tomcat instance before executing a test group and deploy all artifacts needed before running tests. Then stop the instance after running all tests in that group. I found that existing IS tests were written using the first approach. But when considering this case considerable amount of tests would be initiated for combinations of above parameters. So seems 2nd approach would be better. I would like to know the best approach to be followed here. Kindly expect your thoughts on this. Thanks, Malithi. -- *Malithi Edirisinghe* Senior Software Engineer WSO2 Inc. Mobile : +94 (0) 718176807 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
