LinuxSuRen / api-testing

YAML based API testing tool. 开源接口调试、测试工具。Mock Server

Home Page:https://linuxsuren.github.io/api-testing/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support to view the YAML on the testSuite page

LinuxSuRen opened this issue · comments

commented

Description:
Want to view the YAML content of a test suite. As you can see below, users can view the YAML on the page.

image

[optional Relevant Links:]
You might need to do the following things:

  • Update the proto file, make it be able to return the YAML string
  • Implement the logic
  • Run command make grpc grpc-gw to generate codes
  • Update the relevant pages

hello, I would like to have a try!

commented

Please let me know if you need any kinds of help.

I notice that this user's fork has not been updated for a long time and may not continue to complete this Issue.Would it be acceptable for me to proceed with this Issue?

commented

Sure. Please go ahead.

Now I have implemented view YAML under local storage, do I need to submit a PR first? Or continue implementing other storage methods?
example

commented

Good job. You can put the YAML into Codemirror.

See also https://github.com/LinuxSuRen/api-testing/blob/0d481b31ab066f0dad201537d7cfc9bfd0942e17/console/atest-ui/src/views/TestCase.vue#L764C12-L764C23

other storage methods

I didn't understand your point. I think this feature allows users to view or download the YAML file. We don't need to store it in a database or somewhere. So you can submit your PR.

I didn't understand your point. I think this feature allows users to view or download the YAML file. We don't need to store it in a database or somewhere. So you can submit your PR.

The YAML being viewed originate from the current Suite and is stored in a local YAML file.

commented

How did you get the YAML string? Convert it to the front-end with js or backend. I prefer getting it from the backend. The front-end only responsible for showing the content.

The test suite might be stored in a YAML file or a database, s3 .etc.

I get YAML from the backend, perhaps I should first submit a PR to see if it meets the requirements, and then continue to improve it.

commented

Sure. Please do it.