How to create a test directory in Intellij 13?

后端 未结 1 1279
既然无缘
既然无缘 2020-12-02 21:55

I\'m an Intellij noob using v13.

I have a simple java project (default) structure that looks like:

  [] .idea
  [] src
     [] com.test
          m         


        
相关标签:
1条回答
  • 2020-12-02 22:32

    You should have structure like this one:

     [] .idea    
     [] src
        [] main
          [] java   
               com.simpleproject
                 SimpleClass.java
          [] resources
        [] test
          [] java
               com.simpleproject
                 SimpleClassTest.java
          [] resources
    

    After that go to: File->Project Structure->Modules and in "Sources" tab you can choose which folder is "test folder" (usually java in test), which "sources" (usually java in main) etc by clicking "Mark as" options.

    0 讨论(0)
提交回复
热议问题