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

终端调试测试提示:格式化参数失败,公共参数中找不到first_currency。 #4

Closed
wengyangjie opened this issue Nov 22, 2019 · 4 comments

Comments

@wengyangjie
Copy link

wengyangjie commented Nov 22, 2019

Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 2.734 sec <<< FAILURE!
apiTest(test.com.sen.api.ApiTest)  Time elapsed: 0.415 sec  <<< FAILURE!
java.lang.NullPointerException
        at test.com.sen.api.TestBase.getBuildValue(TestBase.java:169)
        at test.com.sen.api.TestBase.verifyResult(TestBase.java:149)
        at test.com.sen.api.ApiTest.apiTest(ApiTest.java:188)

apiTest(test.com.sen.api.ApiTest)  Time elapsed: 0.013 sec  <<< FAILURE!
java.lang.AssertionError: 格式化参数失败,公共参数中找不到first_currency。 expected object to not be null
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.assertNotNull(Assert.java:404)
        at test.com.sen.api.TestBase.getCommonParam(TestBase.java:112)
        at test.com.sen.api.ApiTest.parseUrl(ApiTest.java:259)
        at test.com.sen.api.ApiTest.parseHttpRequest(ApiTest.java:218)
        at test.com.sen.api.ApiTest.apiTest(ApiTest.java:140)

~
@ChenSen5
Copy link
Owner

因为第一个接口执行验证失败导致获取不到数据,所以第二条用例就格式化失败了。

@wengyangjie
Copy link
Author

🤦‍♂️尴尬

@ChenSen5
Copy link
Owner

我这个只是模板,你换换成你真实可用的。

@wengyangjie
Copy link
Author

我这个只是模板,你换换成你真实可用的。

好的谢谢 正在摸索中

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