-
2024-01-16
"The Problem When I write tests in Java, I find it tedious to manually create objects and setting attributes. Code easily turns out like this:
var foo = new Foo("Satellite", 1000, true); var bar = new Bar("Edward", "Scissorhands", List.of(foo)); // do stuff assertEquals(foo, bar.findByName("Satellite")); Here we're first creating a Foo, which is then added to a Bar. We then test that we can find the Foo when we ask the Bar to search for it."
-
2017-02-06
"It might be that pythonistas really don’t like monkey patching, but as I couldn’t find a quick answer on how to mock time in Python I thought I write down here how I did it.
It’s no big deal really, just replace datetime in the module tested with a local implementation. In my case I wanted to to mock datetime.utcnow and to match the call I created a class with utcnow as a static method."
-
2007-12-30
"Ola has released JtestR 0.1. It seems to b a great tool for those doing Java development. I can personally not imagine doing any development these days without RSpec."
-
2007-04-13
"Autotest 3.5.0 is out, and the result given from Autotest is no longer a String, it’s an array of strings. So if you still want Growl to function properly just modify the .autotest slightly:
#ruby module Autotest::Growl def self.growl title, msg, img, pri=0, stick="" system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{stick}" end Autotest.add_hook :ran_command do |at| output = at.results.last.slice(/(\d+)\s.*specifications?,\s(\d+)\s.*failures?/) if output =~ /[1-9]\sfailures?/ growl "Test Results", "#{output}", '~/Library/autotest/rails_fail."
-
2006-08-10
"I don’t like Fit. Believe me, I want to like it, I have tried to like it. I mean, Ward Cunningham created it for crying out loud, the man is a genius, so I am probably just missing something - right?
Every time I have looked at Fit, I always like the parts that handle column fixtures. They are clean and easy to read and generally does a really good job."
-
2004-01-13
"Yesterday we discovered a small but annoying performance bug: when getting a list of languages from the JVM we did not cache them but kept on retrieving them, which turned out to be quite slow.
So, like the good guys we are we wanted to have a test that ensured that the error was not reintroduced. We looked at JUnitPerf which seemed to be appropriate - it decorates a unit test and times it."
-
2003-11-14
"We have got our functional testsuite working. It currently consists of more than 260 tests doing everything from the simple login to running recorded WebDAV tests and restarting Websphere etc.
We’ve done it in the way that Testing Extreme Programming prescribes, with collection of methods that are implemented both remotely and locally, running the servlets in-process. The methods are pretty high-level for a very high degree of usability.
We’ve used HtmlUnit as the basis of our tests, extending it in the high-level methods."
-
2003-09-25
"A few nice people commented on my posts on functional tests and suggested a few other alternatives:
Canoo Webtest. It’s XML-based which makes it go right out my window. Sorry about that. We are a small company where programmers have to do their share of test time. This means that we are not afraid of code, in fact we prefer it. Jameleon. I had not seen this one, but looking at the tutorial it seems a lot more complex than the stuff we use now."
-
2003-09-25
"After evaluating the previous named contenders for webtest tools, the winner was … none of them.
It dawned upon us that the MaxQ way of doing this, ie. recording tests, really is not the way to go, ever. What you’re really doing is testing the server from a HTTP perspective, without testing button clicking and stuff. For example, all hidden fields must be specified at every request. If you have anything Javascript based you still have no clue if this works after having these funtional tests."
-
2003-09-08
"We are currently in the process of improving our functional testsuite, some might say getting one. I’ve skimmed the JUnit site and have found two alternatives:
jWebUnit. It has a really clear and simple syntax which is why I prefer it over HtmlUnit which I prefer over HttpUnit. MaxQ. Recorded Jython scripts. I am not really sure what to make of it. The functional test suite must run separately from the rest of the system, which makes it a good candidate for a scripted language."