Hi Ralph,
Thanks for your reply!
I am confused about it because my class file located in src/main/java rather 
than src/test/java. To raise this in Log4j, I just want to check if somebody 
has the same confusion and already know the root cause of it.
You are right. I will try to ask Eclipse community for clarification.
Bruce Wen 

    On Thursday, June 29, 2017 11:17 PM, Ralph Goers 
<ralph.go...@dslextreme.com> wrote:
 

 If Eclipse (or any other test environment) didn’t add test-classes to the 
class path how would it find your test classes. They would normally be first in 
the class path so that files you want to override for testing are picked up. I 
suspect this is why it is picking up a log4j.properties there instead of the 
classes directory. In any case, this has little, if anything, to do with Log4j.

Ralph

> On Jun 29, 2017, at 1:36 PM, Bruce Wen <crest....@gmail.com> wrote:
> 
> Hi All,
> I am wondering how classpath is decided when run TestNG suite xml file in 
> Eclipse. Why it add target/test-classes in classpath and LogManager load 
> log4j.properties from there rather than target/classes folder.
> I hope somebody can help clarify the root reason for that. Thanks!
> Bruce Wen



   

Reply via email to