Hi All, I have what I would consider a first version of ExcelAnt up and running in my environment. If someone could give me a clue about what things I need to consider before submitting it via bugzilla (as mentioned below, package names, build files, etc), I'd be happy to make the necessary tweaks and then create the ticket. I am expecting that there will be some revisions/additions before it's ready for prime time, but I have it working in my env.
As mentioned below, I added support for the user defined functions that let you write code to replace VB macros. Please feel free to provide me feedback directly about it as it is or about suggestions for future enhancements. Jon ________________________________ From: Jon Svede <[email protected]> To: POI Developers List <[email protected]> Sent: Fri, December 31, 2010 9:25:21 PM Subject: Re: Java Excel testing framework Dave, It would be a pleasure to make a contribution to POI! The Apache Foundation has made my life as a developer much easier and it would be rewarding to make a contribution (small though it may be). Let me work it forward a little more and then I will create the ticket. Do I need to do anything special in consideration of contributing it? (package names, build structures, etc). I want to add support for externally defining user defined functions (because I need that and I imagine others will as well). I was concerned about the POI version thing (i.e., what version of ExcelAnt supports which version of POI), but if I contribute it, that won't be an issue. :-) Happy New Year! Jon ________________________________ From: David Fisher <[email protected]> To: POI Users List <[email protected]> Cc: POI Developers List <[email protected]> Sent: Fri, December 31, 2010 4:54:56 PM Subject: Re: Java Excel testing framework Jon, Yes, please share it. An ant task like this would fit in well with our apps testing framework. I think it would make an ExcelAnt contribution to Apache POI. If you think so, then you could open up a bugzilla and attach. Sounds exciting. Happy New Year, Dave On Dec 31, 2010, at 3:07 PM, Jon Svede wrote: > Yes, I wrote the task last night. I have the skeleton written, here is what > it > > > looks like right now: > > I changed the name to ExcelAnt.... > > <target name="test"> > <excelant fileName="${xls.file.root}/JDSTestCase.xls" > outputFileName="outfile"> > <test name="testName"> > <set cell="sheet1!a1" value="1.0"/> > <evaluate cell="sheet1!a2" expectedValue="1.0" > precision="1.0e-1"/> > </test> > <test name="testName1"> > <set cell="sheet1!a1" value="1.0"/> > <evaluate cell="sheet1!a2" expectedValue="1.0" > precision="1.0e-1"/> > </test> > </excelant> > </target> > > I have to work on integrating the actual POI pieces now, but the task and the > sub elements all can be invoked from an ant script. > > > I had written something else that was like what Mark suggested, something XML > based. But it wasn't this clear and it didn't do the the test part. It > basically just did the updates and evaluated the outputs without any ability > to > > > "test". > > > This to me seems cleaner, easier to write and maintain and integrate into a > build process. Plus, this lets the author write a test in whatever way they > need to. For example, I have spreadsheets were each sheet is basically a > unit > but I have others where you have to treat the whole workbook as a unit. This > doesn't constrain anyone that way. The tests I'll need will be different, > but >I > > think this helps me. > > > Does this help anyone else? I'd be happy to share this if it does. > > Jon > > > > > > > ________________________________ > From: Neil Benn <[email protected]> > To: POI Users List <[email protected]> > Sent: Fri, December 31, 2010 3:35:15 AM > Subject: Re: Java Excel testing framework > > You could make an ant task to do what you need? > > On Fri, Dec 31, 2010 at 12:49 AM, Jon Svede <[email protected]> wrote: >> Is there test framework that uses POI that allows someone to write tests? I >> need to write a lot of tests for some spreadsheets we have and I don't really >> want to write it in Java because it means only I can update them. I was >> thinking of something that let me write JUnit tests in Ant. If that isn't >> clear, here is what I am imagining: >> >> <!-- there's a lot missing here but I didn't want to distract myself --> >> >> <project name="foo"> >> >> <path id="poi.classpath"> >> <fileset dir="${poi.lib}"> >> <include name="**/*.jar"/> >> </fileset> >> </path> >> >> >> <punit file="/path/to/some.xls" classpathref="poi.classpath"> <!-- for lack >> of > > >> a >> better name --> >> <punittest name="anArbitraryTestName"> >> <set cell="sheet1!a1" value="1.0"/> >> <set cell="sheet1!b1" value="2.0"/> >> <evaluate cell="sheet1!c1" expected-value="3.0" precision="1.0e-1"/> >> </punittest> >> </punit> >> >> </project> >> >> >> So basically in my imaginary framework I can test a spreadsheet by setting >> values into cells and the evaluating cells that are formulas and verify the >> result. >> >> This would allow me to quickly write repeatable tests that produce JUnit-like >> output. Maybe the framework would allow output to be written to a file? > Dunno, >> I am just making stuff up. >> >> Does anything like this exist? Or am I off in the weeds here. >> >> Thanks, >> >> Jon >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
