I am developing keyword driven framework in selenium(webdriver) java using testing. I have a function library class where i kept/stored all the methods which needs to perform on websites/webapplications for testing i.e. enterValues in input boxes, click button/level, select dropdown etc. We invoke all these methods from my Driverscript/DriverEngine which reads TestSuite(.xlsx) excel file(Using POI API) where all testcases are documented. TestSuite excel file having specific format i.e. In first sheet, TestSuite where all test cases documented using their run mode ‘Y’ or ’N’. From (second)next sheet onwards, each sheet is named as similar to test case name(in test suite sheet) and its test steps. Test case format in Testsuite.xlsx file is i.e. our column name is
Teststep==Description==Keywords==Object==ProceedonfailFlag==Testdata
their respective values are as shown below…
01==enterusername==enterValue==UserNameInputBox==Y==USERNAME(which user takes from TestData.xlsx file).
Now, till here, it is working great…
In my application, there is a functionality to add multiple user-dependent inventory/objects into the application form. These objects are random based on User's requirement. This feature is achievable by @dataProvider class implementation using TestNG. We are able to run such usecases (same operation multiple times) by creating TestNG dataProvider class separately. But we fail to achieve it by integrating in Keyword file(mentioned earlier). We want to a call this function like other methods from Keyword file. I am totally blank on this approach.Please suggest me, how to integrate the dataProvider approach in KeyWord framework and call this as a action/keyword/methods in java from and in excel file.
I am Thankfull to you in Advance. BestRegards, Vivek
Aucun commentaire:
Enregistrer un commentaire