New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing Excel Test Factory #189
Comments
Can you please update config file code and provide excel file which you are using? |
Config file:
Excel Sheet: I am not able to attach the excel sheet. But below is the content of the excel sheet and the sheet name is test.xls.
|
The format you have defined for excel is a wrong format. <test name="Test" enabled="true">
<parameter name="scenario.file.loc" value="./scenarios/test.xls"></parameter>
<classes>
<class name="com.qmetry.qaf.automation.step.client.excel.ExcelTestFactory" />
</classes>
</test>
Here 1st column should be stepname(not description), and 2nd column is list of arguments. @QAFTestStep(description = "I search for product {0}")
public void searchForProduct(String product) {
//to-do
} |
I changed the excel format but still I am getting the same error. Do we have a sample project for this?
Also, What should I do if I want to pass multiple inputs :) Thanks in advance :) |
Looks like your excel is not in proper xls format. |
Thanks Amit :) That was correct. I was using corrupted file :) Thanks much. Also, I use one input in the excel file and my method takes one parameter. But the input which I am giving in the sheet is not getting passed. Could you please share the step definition for the above excel sheet you shared ? :) |
I have updated step implementation in above comment. You can refer that. |
Thank you :) It worked :) I actually copy pasted the bdd scenario into the excel sheet :) and it read the data from xml and property file:) Happy :) Thanks for the help Amit :) |
Hi Amit, I have this scenario. I need to pass JSONArray or JsonObject as an input. I am using ExcelTestFactory. Below is my sample input: ["nodename",["a","b","c"]] I want the whole world to be read. QAF is not able to read everything as a whole as I have comma in it. Can you please tell me how I can address this :) Thanks much in advance for the help. Also, I cannot store these values in an external file as the input is coming from external team. Kindest Regards, |
QAF Version
Steps To Reproduce
Expected behavior
It should be executed successfully
Actual behavior
jxl.read.biff.BiffException: Unable to recognize OLE stream
at jxl.read.biff.CompoundFile.(CompoundFile.java:116)
at jxl.read.biff.File.(File.java:127)
at jxl.Workbook.getWorkbook(Workbook.java:221)
at jxl.Workbook.getWorkbook(Workbook.java:198)
at com.qmetry.qaf.automation.step.client.excel.ExcelScenarioFileParser.parseFile(ExcelScenarioFileParser.java:46)
at com.qmetry.qaf.automation.step.client.excel.ExcelScenarioFileParser.parse(ExcelScenarioFileParser.java:60)
at com.qmetry.qaf.automation.step.client.ScenarioFactory.process(ScenarioFactory.java:110)
at com.qmetry.qaf.automation.step.client.ScenarioFactory.getTestsFromFile(ScenarioFactory.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.FactoryMethod.invoke(FactoryMethod.java:90)
at org.testng.internal.TestNGClassFinder.(TestNGClassFinder.java:150)
at org.testng.TestRunner.initMethods(TestRunner.java:451)
at org.testng.TestRunner.init(TestRunner.java:270)
at org.testng.TestRunner.init(TestRunner.java:240)
at org.testng.TestRunner.(TestRunner.java:192)
at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:29)
at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:65)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:594)
at org.testng.SuiteRunner.init(SuiteRunner.java:168)
at org.testng.SuiteRunner.(SuiteRunner.java:117)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1319)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1306)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1160)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Is the issue reproducible on runner?
Test case sample
Config File:
The text was updated successfully, but these errors were encountered: