Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

测试用例的运行 #72

Open
yz-qiang opened this issue Mar 17, 2023 · 1 comment
Open

测试用例的运行 #72

yz-qiang opened this issue Mar 17, 2023 · 1 comment

Comments

@yz-qiang
Copy link

您好,我想问一下如何在终端运行您项目当中的测试用例。
例如,在终端运行
jafka/src/test/java/io/jafka/server/AuthenticationTest.java 当中的testBuild()测试用例。
目前试了
① javac/java -cp ....的方法,但是会因为缺少依赖而抛出错误。
② 尝试使用 mvn test -Dtest=jafka/src/test/java/io/jafka/server/AuthenticationTest#testBuild,抛出了无法找到testBuild这个方法。但是奇怪的是使用mvn test-compile -Dtest=jafka/src/test/java/io/jafka/server/AuthenticationTest#testBuild却可以build success。

我需要自动运行这些测试用例中的某些方法。如果您能给我提供解决方案,我将感激不尽。谢谢。

@adyliu
Copy link
Owner

adyliu commented Mar 21, 2023

使用ide 图形化界面更方便点。

如果maven单独测试某个类:
mvn test -Dtest=io.jafka.server.AuthenticationTest#testBuild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants