dbhub.io icon indicating copy to clipboard operation
dbhub.io copied to clipboard

Thoughts on Testing

Open justinclift opened this issue 7 years ago • 4 comments

Go has built in capabilities for writing unit tests, which we should start putting to use in a few weeks (?) once things are a bit further along.

We could additionally write a simple test suite harness for (say) running sqlmap against all of our web pages, with a list of every user input variable on each of the pages for iterating against.

On one hand, doing so should help us catch any problems early on.

On the other hand, having to keep a list of every user input variable updated sounds potentially error prone. From watching some real life examples of sqlmap in use though (findable on YouTube), it seems like sqlmap has some capability to automatically determine variable names. That might help balance against the error-prone nature of manually kept lists.

justinclift avatar Jun 11 '17 06:06 justinclift

with a list of every user input variable on each of the pages

I haven't looked at any Go code, so don't know how major the above is - is it a lot? I'd be interested in helping with testing, as I'd like to tinker with some Go myself.

chrisjlocke avatar Aug 07 '17 09:08 chrisjlocke

It probably wouldn't be a huge amount of work. It's just that manually updated lists like I'm thinking above are pretty error prone over time.

Still it'd be better than what we have now, which is nothing (so far). 😀

For tinkering with Go, you'd probably want to grab this:

    https://www.jetbrains.com/go/

That's Gogland, Jetbrains' Go IDE. It's still "early access" (eg not a final, released product yet), but is in very good shape as is.

With Go itself, ironically on Windows the debugging situation isn't good. Go programs compiled on Windows with the current version of Go (1.8) don't include enough info inside them for debugging to work properly.

Important parts of that should be fixed with Go 1.9, due for release any day now. Looking at the Go 1.9 tracker, all the open issues are now complete so yeah... maybe even today (unsure).

    https://github.com/golang/go/milestone/49

justinclift avatar Aug 07 '17 13:08 justinclift

Looking at the Go 1.9 tracker, all the open issues are now complete

Wouldn't you love to say that about DB4S.... ;) "Yay, all open issues are complete. I'm bored. I'm going outside to paint my fence blue."

chrisjlocke avatar Aug 07 '17 14:08 chrisjlocke

Well... they moved several of the open issues from the Go 1.9 tracker to Go 1.10. We'll probably do similar with ours too. :smile:

justinclift avatar Aug 07 '17 14:08 justinclift