Retour d'expérience MeteorJS
Retour d'expérience sur une application mobile avec site internet, back office. Le tout utilisant la caméra, et faisant du paiement en ligne.
new MaClasseKiDechireMaisKiPlanteMonTest();
Scenario: List 2 files in a directory
Given I am in a directory "test"
And I have a file named "index.html"
And I have a file named "composer.json"
When I run "ls"
Then I should get:
"""
index.html
composer.json
"""
phantom.casperPath = '.\casperjs';
phantom.injectJs(phantom.casperPath + '\\bin\\bootstrap.js');
casper.start('http://www.clubic.com', function capture() {
this.capture('google.png');
this.exit();
});
casper.run();
phantomjs monScript.js
casper.start('http://www.clubic.com',
function captureOnFail() {
if (!this.exists('#uneDivQuiExistePas')) {
this.capture('google.png');
}
this.exit();
});
casper.start('http://www.clubic.com',
function captureOnFail() {
this.test.assertTitle('');
this.test.assertRessourceExists('all.js');
if (!this.test.getFailures()) {
this.capture('google.png');
}
this.exit();
});
ClubicChecker_Actu.prototype.launchTest = function (context) {
"use strict";
try {
// @TODO finish test
context.log('test not finished to define', 'info');
if (ClubicChecker_Actu._super.launchTest.call(this, context)) {
// retreive something from Phantom : context.evaluate(yourCallBackExecutedInPhantom);
// do your test here with context.test. ()
} else {
context.echo('test stopped for module ClubicChecker_Actu');
context.log('some errors has already been detected, launchTest discontinued', 'info');
}
} catch (e) {
require("utils").dump(e);
return e;
}
};
ClubicChecker_Author.prototype.launchTest = function (context) {
try {
if (ClubicChecker_Author._super.launchTest.call(this, context)) {
var metas = [], expected = {url: this.testUrl.replace('https:', 'http:')};
metas = context.evaluate(this.getMetaOg);
this.checkMetaOg(metas, expected);
this.checkMetaFb(metas);
this.checkMetaTwt(metas, expected);
this.checkCanonicalUrl(metas, expected);
this.checkPage();
} else {
context.echo('test stopped for module ClubicChecker_Author');
context.log('some errors has already been detected, launchTest discontinued', 'info');
}
} catch (e) {
require("utils").dump(e);
return e;
}
};
By Retour d'expérience MeteorJS
Présentation au sujet des tests fonctionnels
Retour d'expérience sur une application mobile avec site internet, back office. Le tout utilisant la caméra, et faisant du paiement en ligne.