admin管理员组

文章数量:1201170

I would like to run Postman tests as part of my Maven integration testing. There doesn't seem to be an elegant way of doing that, but I think I can do it in a klunky fashion.

For example, I could export the tests into a JSON file, and then run them later using a command line tool (e.g., newman) fired off from from some Java code. I am content to look at the results in "non-standard" way. In other words, I am willing to read a test file containing postman results instead of having more atomic integration tests, where each integration test runs and reports the results of a single Postman test.

I am looking for recommendations from people who have already tried to incorporate Postman in their JUnit integration testing. Example questions:

  1. Did you put the exported Postman JSON file under src/test/resources?
  2. Did you use some third-party tool (like newman) to run the Postman tests? If so, did you have a single JUnit "test" run the entire Postman test suite?
  3. Did you find a convenient way to integrate the Postman results with the JUnit results? How did you code that?

本文标签: junitHow to incorporate exported Postman tests into Maven integration testingStack Overflow