More Related Content Similar to Smolder @Silex Similar to Smolder @Silex (20) Smolder @Silex3. Smolder
• Web-based Continuous Integration
Smoke Server
• Reporting Format - TAP
• Test Anything Protocol
• Multiple Notification Channels
• Email / ATOM
• Perl (Customizable?)
4. Built With...
• CGI::Application
• Template Toolkit2
• SQLite | MySQL
• Prototype.js
5. Installation
• $ cpanm Smolder
• $ git clone git://github.com/mpeters/
smolder.git
• $ perl Makefile.PL && make test &&
make install
6. Run on Plack
• CGI::Application::Emulate::PSGI
• @kazuho++
• http://d.hatena.ne.jp/tokuhirom/
20100111/1263224765
• @tokuhirom++
7. Usage
• Write some test codes
8. t/002_hairless.t
use Test::More tests => 7;
BEGIN {
use_ok("Yuni");
}
my $guy = Yuni->new;
ok($guy->has_hairs, "... Actually, some hairs...");
is($guy->is_solo, 1, "Don't you know that?");
isnt($guy->is_married, "huh?");
like($guy->age, qr/^3[0-9]$/, "30s");
SKIP: {
skip "is this Confirmized?", 1;
ok($guy->part_from_austin, "OTL");
};
TODO: {
local $TODO = "My Hairs!!!";
ok($guy->restore_hairs, "Chaebol?");
};
done_testing();
11. Run Tests!
$ prove -Ilib t/*.t --archive tap-archive.tar.gz
t/001_requires.t .. skipped: Test requires module 'Yuni::Hair' but it's not found
t/002_hairless.t .. ok
All tests successful.
Files=2, Tests=7, 1 wallclock secs ( 0.04 usr 0.01 sys + 1.14 cusr 0.08 csys = 1.27 CPU)
Result: PASS
TAP Archive created at /Users/jeen/Office/seminar-test/tap-archive.tar.gz
12. TAP Archive?
$ tree
. $ cat meta.yml
---
meta.yml file_attributes:
-
t description: t/001_requires.t
001_requires.t end_time: 1306210679.30879
start_time: 1306210678.7085
002_hairless.t -
description: t/002_hairless.t
end_time: 1306210679.9355
start_time: 1306210679.32536
1 directory, 3 files file_order:
- t/001_requires.t
- t/002_hairless.t
start_time: 1306210678
stop_time: 1306210679
13. TAP Archive?
$ tree
. $ cat t/002_requires.t
1..7
meta.yml ok 1 - use Yuni;
ok 2 - ... Actually, some hairs...
t ok 3 - Don't you know that?
001_requires.t ok 4
ok 5 - 30s
002_hairless.t ok 6 # skip is this Confirmized?
not ok 7 - Chaebol? # TODO My Hairs!!!
# Failed (TODO) test 'Chaebol?'
1 directory, 3 files # at t/002_hairless.t line 20.
14. Uploading to Smolder
$ smolder_smoke_signal --server smolder.silex.kr
--port 80
--username jeen --password [dkfdktjanjgo?]
--file result-arch.tar.gz --project Blahblah
--architecture [ARCH] --platform [PLAT]
15. * write uploading code
( + comments, architecture, platform )
LWP::UserAgent->new()->post(
'http://smolder.project.org/app/developer_projects/add_report/$project_id',
Content_Type => 'form-data',
Content => [
architecture => '386',
platform => 'Linux',
comments => $comments,
username => 'my-user',
password => 's3cr3t',
report_file => ['tap_archive.tar.gz'], ]
);
19. WTF?
$ git diff Graphs.pm
diff --git a/lib/Smolder/Control/Graphs.pm b/lib/Smolder/Control/Graphs.pm
index c41dbe9..e97abb8 100644
--- a/lib/Smolder/Control/Graphs.pm
+++ b/lib/Smolder/Control/Graphs.pm
@@ -162,7 +162,7 @@ sub image {
open($NO_DATA_FH, '<', $file)
or die "Could not open '$file' for reading: $!";
local $/ = undef;
- print <$NO_DATA_FH>;
+ <$NO_DATA_FH>;
close($NO_DATA_FH) or die "Could not close file '$file': $!";
} else {
@@ -181,7 +181,7 @@ sub image {
legend => @legend,
title => $title,
);
- print $gd->png;
+ $gd->png;
}
}