-
Notifications
You must be signed in to change notification settings - Fork 15
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
Is the Loading Data using Excel wiki up to date? #67
Comments
Hi Mark, For eg. you can have a filed in your Excel sheet with a date value like this : 16-06-1980. You can then use the Format annotation to specify the format of the date in your test class. EasyTest will then convert the string value in the excel sheet to a Date using the specified format. Format annotation is supported for Date, Time and DateTime objects. For other primitive objects like Integer, Boolean, Short, Long, Float etc it is taken care automatically for you. If you want the value specified in the excel to be converted to some specific Object (for example to an instance of a class custom written), you can use the Does this answer your question? Is there any specific functionality that you are looking at, which I can help you with? |
Hi Anuj. Thanks for the quick reply! I don't actually have any use cases for that particular scenario at present, I was just evaluating against some possible future requirements. All of the items I am loading in are Excel files and all cell values are Strings (which makes life easier) Essentially, I am trying to use EasyTest to load in some login details from an excel file along with an expected result and then re-run a login @test using all data rows. The issues I am having so far are:
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal I have my class setup as follows. Is there anything obviously wrong that you can see? package tests; import org.easetech.easytest.loader.LoaderType; import org.easetech.easytest.annotation.Param; import static org.junit.Assert.*; @RunWith(DataDrivenTestRunner.class) //added for Data driven testing using Easytest
}
} Thanks in advance for any help you could provide. I am not a developer by trade, I am a tester who is self-taught in java so forgive me if the answer is somewhat obvious to a professional. |
Hi Mark, As you mentioned XLSX is indeed not supported currently for the reason you mentioned. I would be more than happy to merge a pull request supporting XSLX. BTW, which version of EasyTest are you using? |
Sure - i've emailed it to you now (as I could not attach it). It only has one row with some dummy data in it at the moment until I can get my setup working and expand it out. I've also uploaded the whole project to github now... https://github.com/markwinspear/seleniumguidebook-examples/ (Note - this expanded from implementing some examples in the Selenium guidebook (hence the legacy name), but has been expanded out since then) I'm referencing version 1.3.2 of easytest-core in my maven pom. I wouldn't know where to start regarding the pull request and modification to support xslx unfortunately - I would certainly be willing to do this otherwise as I think easytest is a great solution to data provisioning. |
Hey Mark, Before that, lets get you started with EasyTest. One thing I noticed is Thanks, On Thu, Jun 18, 2015 at 11:17 AM, markwinspear [email protected]
|
Thanks for that Anuj. Regarding the XLSX issue, I've cloned and branched your code. it looks like 'SS' can be used in place of 'XSSF' and 'HSSF' to enable either to be used, however, your code already uses 'SS' in most places - I've made a few tweaks - just not sure how to get them to you to review using git (I'm using Intellij) |
Hey mark, |
Apologies, I will do that now |
Ok, I've commited the changes to ExcelDataLoader that I think will work (I attempted to run all the tests but there are errors elsewhere unrelated to the changes I made). |
Hi Mark, I am glad you are taking out time to commit to easyTest. I appreciate it. Thanks, On Thu, Jun 18, 2015 at 3:06 PM, markwinspear [email protected]
|
No problems. It's been a nice challenge to do this in github for the first time! I'm unable to create a pull request containing the new branch I created as I can only select existing branches. I've tried from both Intellij and from the github windows gui with the same result! I have emailed the file to you with a list of changes made - there were only a few |
Hi
I notice that the last updated date on this wiki page is November 2012 and signs-off with .. "Very soon, and I mean really very soon, we will be supporting defining data in terms of Excel Objects. So a user can define a Date object as a value of the box in the given column and easyTest will take care of properly interpreting them and providing the right value to your test case.
I will keep you posted as and when that gets available."
Has the functionality changed and is the wiki page up to date please?
The text was updated successfully, but these errors were encountered: