代码之家  ›  专栏  ›  技术社区  ›  Nilotpal

Intellij:错误:无法编译Groovy文件:在运行Junit测试用例时,没有为模块定义Groovy库

  •  0
  • Nilotpal  · 技术社区  · 6 年前

    我正在Intellij中运行一个Junit测试用例,我还得到了“RunTestCase”选项。但是当我运行它时,我得到一个错误:

    Error:Cannot compile Groovy files: no Groovy library is defined for module 'Module-Name'
    

    import org.junit.Test
    
    class HttpInteractTest {
    @Test
    void testGetDataFromHttpDomainEndpoint() {        
    }
    void testGetData() {
    }
    

    }

    不知道为什么IDE突然开始抱怨Groovy。我没有任何groovy代码或连接!!

    提前谢谢!!

    0 回复  |  直到 6 年前
        1
  •  0
  •   Nilotpal    5 年前

    将默认测试库更改为JUnit4/5。有一种可能性是默认测试库被更改为Groovy。