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

Format for direct publication #14

Open
Jumziey opened this issue Jul 9, 2023 · 3 comments
Open

Format for direct publication #14

Jumziey opened this issue Jul 9, 2023 · 3 comments

Comments

@Jumziey
Copy link

Jumziey commented Jul 9, 2023

When thinking about the use case for gotestdox as something that can do part of the documentation, have there been any thought about changing the output format to be something like markdown? That would enable easy publication of the results for stakeholders etc. to keep track of what a software suite supports.

@bitfield
Copy link
Owner

Well, that sounds like a good idea, but I'm not sure we need to do anything special for gotestdox output to be usable in Markdown documents. This comment is formatted in Markdown, and I've pasted some output in directly:

github.com/bitfield/shift:
✔ BlockSize returns block size (0.00s)
✔ Decrypt (0.00s)
✔ Decrypt 010203040506 - 0101010101010101010101010101010101010101010101010101010101010101 = 000102030405 (0.00s)
✔ Decrypter crypt blocks (0.00s)
✔ Encrypt (0.00s)
✔ Encrypt 000102030405 + 0101010101010101010101010101010101010101010101010101010101010101 = 010203040506 (0.00s)
✔ Encrypter enciphers block aligned message (0.00s)
✔ NewCipher gives err key size for invalid key (0.00s)
✔ NewCipher gives no error for valid key (0.00s)
✔ Pad (0.00s)
✔ Pad 1 short of full block (0.00s)
✔ Pad 2 short of full block (0.00s)
✔ Pad 3 short of full block (0.00s)
✔ Pad empty block (0.00s)
✔ Pad full block (0.00s)
✔ Unpad (0.00s)
✔ Unpad 1 short of full block (0.00s)
✔ Unpad 2 short of full block (0.00s)
✔ Unpad 3 short of full block (0.00s)
✔ Unpad empty block (0.00s)
✔ Unpad full block (0.00s)

It looks fine! What other formatting would you suggest?

@Jumziey
Copy link
Author

Jumziey commented Jul 20, 2023

Looks pretty good, especially in a terminal. And I must agree I was a bit unclear 🙈. Lets put the text you pasted into dillinger (online markdown editor) and it looks like this:
image

What I was thinking was to use some more of the refinement you can use with a doc format such as markdown (not married to markdown though) to make it closer whats described for agiledox. A simple example could be to simply add each package as a sub header and perhaps some collective information as the last output in package like

## github.com/bitfield/shift:
 ✔ BlockSize returns block size (0.00s)
 ✔ Crack (0.01s)
 ✔ Decrypt (0.00s)
 ✔ Decrypt 010203040506 - 0101010101010101010101010101010101010101010101010101010101010101 = 000102030405 (0.00s)
 ✔ Decrypter crypt blocks (0.00s)
 ✔ Encrypt (0.00s)
 ✔ Encrypt 000102030405 + 0101010101010101010101010101010101010101010101010101010101010101 = 010203040506 (0.00s)
 ✔ Encrypter enciphers block aligned message (0.00s)
 ✔ NewCipher gives err key size for invalid key (0.00s)
 ✔ NewCipher gives no error for valid key (0.00s)
 ✔ Pad (0.00s)
 ✔ Pad 1 short of full block (0.00s)
 ✔ Pad 2 short of full block (0.00s)
 ✔ Pad 3 short of full block (0.00s)
 ✔ Pad empty block (0.00s)
 ✔ Pad full block (0.00s)
 ✔ Unpad (0.00s)
 ✔ Unpad 1 short of full block (0.00s)
 ✔ Unpad 2 short of full block (0.00s)
 ✔ Unpad 3 short of full block (0.00s)
 ✔ Unpad empty block (0.00s)
 ✔ Unpad full block (0.00s)
 **Test coverage xx%**

That would be parsed in Dillinger like
image

Should also note that I'm just using Dillinger to make it easy to test for anyone checking this out, but the general formatting is pretty similar across tools.

@afbjorklund
Copy link

afbjorklund commented Aug 28, 2023

It is possible to use go-test-report, to generate HTML documents and to generate markdown (with a PR)

https://github.com/vakenbolt/go-test-report

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

3 participants