Writing results back to file is not working if test class is run individually
Closed this issue · 8 comments
When I am trying to run TestExcelDataLoader as JUnit test, writing results back to the file is not working. where as if I ran it as part of complete project 'mvn clean install' its working.
Please check.
Looks to me there is some problem with RunAftersWithOutputData.
I tried this in latest 0.6.2-SNAPSHOT and also previous snapshots, same result.
In debugging, I found that Loader is set to null when method return type is Void, at line no : 325 in DataDrivenTestRunner class at withAfterClasses method. Not sure, why we are doing this. may be for void types we might not to write results back to file, I think this logic we are anyhow having in writeData method i.e. only if ActualResults exists in the map then we write data back to xls.
Can we remove that if condition of checking return type is void?
Sure. I am mot sure when i had put that if condition
there. Do check that everything else is working as well.
Thanks.
Anuj
On Monday, October 8, 2012, ravi-polampelli wrote:
In debugging, I found that Loader is set to null when method return type
is Void, at line no : 325 in DataDrivenTestRunner class at withAfterClasses
method. Not sure, why we are doing this. may be for void types we might not
to write results back to file, I think this logic we are anyhow having in
writeData method i.e. only if ActualResults exists in the map then we write
data back to xls.
Can we remove that if condition of checking return type is void?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-9225179.
Anuj Kumar
Only one test case is failing - CGLIBEnhancerTest as it doesn't have Custom Loader, not sure how it is working while its loading data.
Failed tests:
org.easetech.easytest.interceptor.CGLIBEnhancerTest: The framework currently does not support the specified Loader type. You can provide the custom Loader by choosing LoaderType.CUSTOM in TestData annotation and providing your custom loader using DataLoader annotation.
Can you please create pull request again from master to ravi branch? I think you created it once but I couldn't find that now, and I haven't pulled that request. Is it possible to add my name as developer? then it will be easy for me to convince in my company regarding ongoing support of EasyTest.
Hi Ravi. Sorry i was not able to reply to you earlier. I am on vacation in
Greece and doesnt have access to the code base. I am back on wednesday. I will definitely add your name as a developer in the pom file. I will also create a pull request then. Or if you want you can create a pull request yourself from master to ravi.
Cheers!
I have added your name as a developer to the EasyTest project. And let me take this opportunity to again thank you for your valuable contributions to EasyTest. I think we are doing great and going in the right direction.
Cheers!
This is fixed now.