News for hackers. Stuff that matters.
Re:Barliman: Prototype of a smart text editor by tedmiston on Saturday July 30, 2016 @06:40PM (#12194967)
Does anyone generate tests automatically?

I've been looking for something related to this. Whenever I design unit test cases, I write out the common edge cases, let's say: valid input, invalid input (wrong data type), invalid input (too long), etc, then translate them into tests. I might write them in a way that the tests are the combination of various dimensions of input, one per variable. For example, try input1=['a', 'aaa', None] x input2=[-1, 0, 1, None] for each combination knowing which I expect to pass and fail.

Often the tests are similar (write one, duplicate, slightly change the logic), and I've always felt like there has to be some kind of test generation framework out there to do this, though I haven't heard of anyone actually using one.

Re:Barliman: Prototype of a smart text editor by bryanh on Saturday July 30, 2016 @11:14PM (#12195582)
Immediately QuickCheck comes to mind (https://hackage.haskell.org/package/QuickCheck).

Folks have written (possibly less powerful) implementations in Python (https://github.com/HypothesisWorks/hypothesis-python), Javascript (https://github.com/jsverify/jsverify), etc.

FWIW I've found them fragile and lacking for my use cases - but I bet fuzzing style testing tools could be pretty valuable in certain cases.

Re:Barliman: Prototype of a smart text editor by joshschreuder on Saturday July 30, 2016 @07:31PM (#12195082)
I haven't used it (I think Microsoft has abandoned the project anyway), but I think this was one of the goals of Pex (https://www.microsoft.com/en-us/research/project/pex-and-mol...)

Looks like it became Intellitest (https://www.visualstudio.com/news/vs2015-vs#Testing). But I'm not convinced such high test coverage is useful in most scenarios.