The document contains a series of nonsensical symbols and text fragments with no clear meaning. It includes programming language keywords and testing concepts like properties, mocking, concurrency, and metrics but does not form coherent sentences.
4. “The number of languages you know
corresponds to your programming
skill”
S
5. Y ... T
JUnit ScrewUnit
Rspec JBehave
PHPSpec Jasmine
JSpec Cucumber
Circumspec BlahSpec
SomethingSpec WhateverSpec
6. Y ... T
JUnit ScrewUnit
Rspec BORING!
JBehave
PHPSpec Jasmine
JSpec Cucumber
Circumspec BlahSpec
SomethingSpec WhateverSpec
7. T &M
Ruby
Monkey.stub!(:new).and_return(mock("monkey"))
Java
I owe you one Java mocking example.
I don’t have the will power to write it.
Sorry.
8. T &M
Ruby
BORING!
Monkey.stub!(:new).and_return(mock("monkey"))
Java
I owe you one Java mocking example.
I don’t have the will power to write it.
Sorry.
9. I r
Asynchronous Property testing
Permutation Model testing
explosions
Metrics Test feedback
Graphical tests
11. “Program testing can be used to show the
presence of bugs, but never to show their
absence!”
Edsger Dijkstra
12. Q C
Properties
For all values of s the length of the thing
returned by five_random_characters is 5
13. Q C
Properties
QuickCheck
Randomly
Logic generate Function
tests
14. Q C
Properties
QuickCheck
Randomly
Logic generate Function
tests
15. Q C
Properties
QuickCheck
Randomly
Logic generate Function
tests
16. Q C
Properties
QuickCheck
Randomly
Logic generate Function
tests
17. Q C
Properties
QuickCheck
Randomly
Logic generate Function
tests
Counter
Examples
18. Q C
Properties
it "should reverse a string" do
"monkeys".reverse.reverse.should == "monkeys"
end
100.times.map {“#{rand(10)}#{rand(10)}”}.each do |char|
it "should reverse a string" do
char.reverse.reverse.should == char
end
end
19. Q C
Properties
import Data.Char
import Test.QuickCheck
instance Arbitrary Char where
arbitrary = choose ('32', '128')
coarbitrary c = variant (ord c `rem` 4)
prop_RevRev xs = reverse (reverse xs) == xs
where types = xs::[Char]
$ Main> quickCheck prop_RevRev
OK, passed 100 tests.
21. M Er Models
Erlang McErlang
runtime runtime
system system
communication
concurrency
distribution
22. M Er Models
message Messenger
“Scottish
“Scottish Service
fiction”
fiction”
Message login login Message
client client
Fred Clara
23. M Er Models
if user1 does not send a message m to user2 until user2 is logged on,
then
if user1 does send a message m to user2
then
eventually user2 receives the message m.
"not P until Q => (eventually P => eventually R)”
P: clara sends message “Scottish fiction” to fred
Q: fred is logged on
R: fred receives the message “Scottish fiction” from clara
24. M Er Models
{program={scenario,start,[[
[{logon,clara},{message,fred,"hi"},logoff],
[{logon,fred},logoff]]]},
monitor={mce_ltl_parse:ltl_string2module_and_load
("not P until Q implies (eventually P implies
eventually R)", messenger_mon),
{void,[{'P',basicPredicates:message_to
(clara,fred,"hi")},
{'Q',basicPredicates:logon(fred)},
{'R',basicPredicates:message_received
(fred,clara,"hi")}]}},
algorithm={mce_alg_buechi,void}}).
25. “Every method you use to prevent or find
bugs leaves a residue of subtler bugs against
which those methods are ineffectual
Pesticide Paradox / Beizer
33. Z b .
Trapped inside a browser
var zombie = require("zombie");
var assert = require("assert");
zombie.visit("http://localhost:3000/",
function (err, browser, status) {
browser.
fill("email", "zombie@underworld.dead").
pressButton("Sign Me Up!",
function(err, browser, status) {
assert.equal(browser.text("title"), "Welcome");
})
});
34. V w
Topics
{ topic: function () { return 42 },
'should be a number': function (topic) {
assert.isNumber (topic);
},
'should be equal to 42': function (topic) {
assert.equal (topic, 42);
}
}
35. V w
Asynchronous calls
{ topic: function () {
fs.stat('~/FILE', this.callback);
},
'can be accessed': function (err, stat) {
assert.isNull (err); // We have no error
assert.isObject (stat); // We have a stat object
},
'is not empty': function (err, stat) {
assert.isNotZero (stat.size); // The file size is > 0
}
}
36. V w
Promises / Futures
{ topic: function () {
var promise = new(events.EventEmitter);
fs.stat('~/FILE', function (e, res) {
if (e) { promise.emit('error', e) }
else { promise.emit('success', res) }
});
return promise;
},
'can be accessed': function (err, stat) {
assert.isNull (err); //We have no error
assert.isObject (stat); //We have a stat object
},
'is not empty': function (err, stat) {
assert.isNotZero (stat.size); //The file size is > 0
}
}
37. V w
Parallel Execution
{ '/dev/stdout': {
topic: function () { path.exists('/dev/stdout',this.callback) },
'exists': function (result) { assert.isTrue(result) }
},
'/dev/tty': {
topic: function () { path.exists('/dev/tty',this.callback) },
'exists': function (result) { assert.isTrue(result) }
},
'/dev/null': {
topic: function () { path.exists('/dev/null',this.callback) },
'exists': function (result) { assert.isTrue(result) }
}
}
49. ‘‘How much do you know about the
heuristics of failure?’
Joseph Wilk
Scotland Ruby Conf 2011
http://testobsessed.com/wp-content/uploads/2007/02/testheuristicscheatsheetv1.pdf