我使用JGraphT框架在Netbeans IDE上使用圖模型。我編寫了一些類並嘗試編寫JUnit測試。但我可以運行測試。現在有選項可以運行類文件。另外這個框架使用maven,然後我點擊測試類測試文件,我得到這個錯誤:如何在JGraphT上爲自己創建的Java類創建自己的JUnit測試?
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-cli) on project jgrapht-demo: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
我想從pom.xml文件和相關設置出現此問題。
這是我的用於MainWindow類的TestClass,它是空的並從MainWindows類生成。 enter image description here
// ---------------------------------
顯示當然 – VDanyliuk
而考驗我的pom.xml文件http://pastebin.com/1STbwb2D – VDanyliuk
的目錄結構和pom.xml的 – user3798502