Safe network test suite

I’ve been doing a bunch of testing and finding some strange stuff along the way.

I figured the repo may be useful to others so why not put it up.

It’s easy enough to test stuff by hand, I did a lot of that, but then I found myself wanting to keep a record of what I did, so the easiest way is to record the steps in code and then we can replay it any time. I can also keep notes in the code comments for each test, link back to github issues/prs etc. It also acts as a list of what strange stuff works or does not work (newlines in nrs names? emojis? rtl control chars? It’s all documented in there). Any time some new weird shit comes up we can bung it in and build a nice list of oddities.

I went with the closest thing to writing commands manually by hand (not exactly true, bash would be closest, but it’s not quite flexible+simple enough for my tastes so python is the next closest option).

I don’t expect many people to find this useful, I wrote it for myself, but to me it’s been extremely useful so if even one other person finds it as useful as I did then I figure it’s worth publishing.

Still pretty thin, but that’s because the tests so far have led to a lot of work writing fixes or getting to the crux of an issue. Things are looking pretty good again so I’ll hopefully be adding more tests in the near future.

Not all the tests pass. Some I let fail, some I skip, it just depends how I felt when I wrote them.

On ubuntu linux it requires no dependencies. It uses standard python unittest. I think it’s not set up in a totally pythonic unittest way but it works well enough for my needs now.

There are lots of tests in the maidsafe repos. All the tests in this test suite could have been added there, but I wanted to take a step out from rust, look at what’s really happening as people are really using it, and do that, but automated. It also helps me learn the api, which adding rust tests doesn’t really do as well.

If anyone has any particular tests that nobody has done yet or some wacky stuff to try and break the network I’d be interested to hear about it.

23 Likes

Thanks @mav ! It’s always good to see folks outside of the team doing tests, especially when they’re using an independent platform.

10 Likes