api-testing icon indicating copy to clipboard operation
api-testing copied to clipboard

Support to view the YAML on the testSuite page

Open LinuxSuRen opened this issue 1 year ago • 4 comments

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

LinuxSuRen avatar Apr 23 '24 03:04 LinuxSuRen

hello, I would like to have a try!

suoaiyisheng avatar Apr 30 '24 02:04 suoaiyisheng

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

LinuxSuRen avatar Apr 30 '24 02:04 LinuxSuRen

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?

SamYSF avatar May 15 '24 15:05 SamYSF

Sure. Please go ahead.

LinuxSuRen avatar May 16 '24 00:05 LinuxSuRen

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

SamYSF avatar May 17 '24 03:05 SamYSF

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.

LinuxSuRen avatar May 17 '24 03:05 LinuxSuRen

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.

SamYSF avatar May 17 '24 03:05 SamYSF

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.

LinuxSuRen avatar May 17 '24 04:05 LinuxSuRen

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.

SamYSF avatar May 17 '24 07:05 SamYSF

Sure. Please do it.

LinuxSuRen avatar May 17 '24 07:05 LinuxSuRen