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

doc: explain how to write ooni nettests #505

Closed
wants to merge 2 commits into from
Closed

doc: explain how to write ooni nettests #505

wants to merge 2 commits into from

Conversation

bassosimone
Copy link
Contributor

@bassosimone bassosimone commented Sep 15, 2021

Checklist

Location of the issue tracker: https://github.com/ooni/probe

Description

This is a preliminary commit and requires more work. I am going
to push this commit so others soon can start to review it.

This draft supersedes #505

This diff also contains a library of building blocks that is
instrumental to complete websteps. In fact, the tutorial I have
written here will eventually guide people to write their own
implementation of websteps.

I have not written any test for the new code so far. It is
also a stretch to call this new code. It is existing code that
has been written by me or @kelmenhorst that I have adapted
for the purpose of writing the tutorial.

The nice exercise of writing a tutorial is that you are more
easily frustrated if the code is difficult to use XD.

How to review the tutorials

Navigate to internal/tutorial/measure and follow the links
inside the README.md file. Or go to https://github.com/ooni/probe-cli/tree/WORK/internal/tutorial/measure
and read starting from there, which is equivalent.

Editing is quite tricky. Most text comes from comments in
Go files. You need to edit the comments and then you need
to regenerate all the files. The README.md of the
internal/tutorial/measure tutorial contains instructions
on how to do that.

What remains to be done before merging

Mainly adding tests and making sure I didn't lose
anything when adapting existing code. I like the interface
of the new code more, but existing code written last
August may have a better implementation of corner cases.

This is a preliminary commit and requires more work. I am going
to push this commit so others soon can start to review it.

This diff also contains a library of building blocks that is
instrumental to complete websteps. In fact, the tutorial I have
written here will eventually guide people to write their own
implementation of websteps.

I have not written any test for the new code so far. It is
also a stretch to call this new code. It is existing code that
has been written by me or @kelmenhorst that I have adapted
for the purpose of writing the tutorial.

The nice exercise of writing a tutorial is that you are more
easily frustrated if the code is difficult to use XD.

See ooni/ooni.org#361.

See ooni/probe#1733.
internal/measure/quic.go Outdated Show resolved Hide resolved
@bassosimone
Copy link
Contributor Author

I flagged a couple of places that were wrong. After re-reading, it seems to me all chapters could benefit from more subsections with titles. This will allow to provide comments before and after snippets of code with a more clear delimiter.

After first round of self code/doc review.
@bassosimone
Copy link
Contributor Author

Superseded by #506

@bassosimone bassosimone deleted the WORK branch September 24, 2021 13:16
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

Successfully merging this pull request may close these issues.

1 participant