Closed andrericardo closed 6 years ago
Hi @andrericardo
We've been looking at implementing unit tests recently.
I'm not convinced the if $0 == __FILE__
approach would work here without some other refactoring (threads and command line parsing for starters).
Ideally the tests could be performed by instantiating a WhatWeb object then calling methods on the object. This would require some refactoring.
Perhaps in the short term you could fork a process and parse the output?
Thanks for the suggestion @andrericardo. Travis CI looks like a good platform for testing.
Thanks @bcoles for writing the Rake unit tests.
Hello, I would like to add some initial tests, but running them with the current whatweb is a bit tricky. For example the simple run
$ ./whatweb slashdot.org reddit.com
hangs when ran inrake
maybe because rake eats the ARGV ? and the target list ends up beingThe whole full log is here: https://travis-ci.org/andrericardo/WhatWeb/jobs/165846465
My branch code is here https://github.com/andrericardo/WhatWeb/blob/continous-integration/test/test_whatweb.rb
From what I read it would be easier if whatweb had
Is this something you are interested in having?