Permalink
Browse files

move test run show page improvments

  • Loading branch information...
1 parent 25bb481 commit 015f62dd372c3d589a4c0f80cba2690ee0867e73 Jared Grippe and Tim James committed with May 7, 2012
Showing with 73 additions and 127 deletions.
  1. +0 −5 README.markdown
  2. +15 −42 lib/hobson/server/views/projects/test_runs/show.haml
  3. +58 −80 lib/hobson/server/views/screen.sass
View
@@ -232,15 +232,10 @@ Right now a 'test' is an individual feature or spec file. In the near future we'
# TODO
- * use redis index sets instead of using the keys command
* add a test run post processing job to do things like compile SimpleCov reports
- * add a requested-by tag to show what engineer created what test_run
- * refactor feature tests to mean individual scenarios rather then .feature file
* detect when a sha isn't on origin and error
- * update balancing logic to be aware of 0 est runtimes rather then using 0.1 as a hack
* find a fix for empty test files
* when a test file is empty it's never updated by the hobson status formatter and the whole test run is hung
- * improve the way Hobson uses redis. It's wicked slow atm.
* add hobson & hobson project configuration options
* min / max jobs per test_run
* min / max tests per job
@@ -28,17 +28,10 @@
%dt Status
%dd= test_run.status
- -# %dt Est. Duration
- -# %dd= distance_of_time_in_words(est_test_run_duration, 0, true) if est_test_run_duration.present?
-
%dt Duration
%dd= distance_of_time_in_minutes(test_run_duration)
- -# %dd= distance_of_time_in_words(test_run_duration, 0, true) if test_run_duration.present?
- - if test_run.running?
- -# %dt Progress
- -# %dd
- -# - progress
+ - if test_run.tests.present?
%dt Tests Completed
%dd.tests-completed
@@ -51,50 +44,30 @@
%dd
= test_run.tests.find_all(&:needs_run?).count
- %dt Test Retries
- %dd= test_run.tests.map{|t| t.tries < 1 ? 1 : t.tries}.sum - test_run.tests.count
+ %dt Hungs Tests
+ %dd= test_run.tests.find_all(&:hung?).count
+
+ %dt Test Retries
+ %dd= test_run.tests.map{|t| t.tries < 1 ? 1 : t.tries}.sum - test_run.tests.count
- if test_run.jobs.present?
%section.jobs
%h2 Jobs
%ol.status
- test_run.jobs.each do |job|
%li.job{:class => "status-#{classname(job.status)}"}
-
- %dl.details{:style => 'display:none'}
- %a.name{:href => "ssh://#{job['hostname']}"}
- %dt Job
- %dd #{job.index}
-
- .status
- %dt Status
- %dd= job.status
-
- .tries
- %dt Tries
- %dd= job.tries
-
- .est-runtime
- %dt Est. Runtime
- %dd= distance_of_time_in_minutes job.est_runtime
-
- .runtime
- %dt Actual Runtime
- %dd= distance_of_time_in_minutes job.runtime
-
- - if job.errored?
- .error
- %dt Error
- %dd
- %h2 Exception #{job['exception:class']}:
- .exception= job['exception:message']
- %h2 Backtrace:
- .backtrace= job['exception:backtrace']
-
.icon
-
+ .index= job.index
%ol.timeline
- job_timeline(job)
+ - if job.errored?
+ .error
+ %dt Error
+ %dd
+ %h2 Exception #{job['exception:class']}:
+ .exception= job['exception:message']
+ %h2 Backtrace:
+ .backtrace= job['exception:backtrace']
- if test_run.tests.present?
%section.tests
@@ -84,6 +84,7 @@ form
font-family: PastDueRegular
font-size: 100px
-webkit-transform: rotate(40deg)
+ text-shadow: grey 0 0 10px
&.failed
color: red
@@ -188,9 +189,8 @@ section.project, section.project-ref
section.new-project
-
a.new-test-run
- display: block
+ display: inline-block
margin-bottom: 1em
form.new-test-run
@@ -244,88 +244,66 @@ table.test-runs tbody tr
font-weight: bold
section.jobs
- > .status > *
- position: relative
- margin: 0
- padding: 2px 0
- > .details
+ > .status
+ > .job
+ display: -webkit-box
+ box-align: strech
> *
- padding: 0.25em 0
- overflow: hidden
- white-space: nowrap
- text-decoration: none
- > *
- float: left
+ //display: inline-block
+ > .icon
+ height: 16px
+ width: 16px
+ background: white url(/spinner-onwhite.gif) no-repeat scroll top right
+ > .index
margin-right: 1em
- > *
- display: inline-block
- // > dt
- // > dd
-
- > .name
- min-width: 60px
- // > .est-runtime
- // > .runtime
- // > .error
-
- h3
- font-weight: bold
-
- h2
- margin: 1em 0 0 22px
- font-style: italic
-
- .icon
- position: absolute
- bottom: 6px
- left: 0
- height: 16px
- width: 16px
- background: white url(/spinner-onwhite.gif) no-repeat scroll top right
-
- .timeline
- position: relative
- margin: 0 0 0 25px
- padding: 0
- min-height: 1em
- // border: 1px dotted #B4B4B4
- background-color: lightgrey
- overflow: hidden
- cursor: default
-
- &, > *
- line-height: 10px
- height: 20px
- > *
- // float: left
- position: absolute
- top: 0
- bottom: 0
- overflow: hidden
+ width: 2em
+ text-align: right
+ //display: inline-block
+ > .timeline
+ -webkit-box-flex: 1
+ //display: block
+ position: relative
margin: 0
- padding: 0.5em 0
- text-indent: 0.5em
- white-space: nowrap
- font-size: 90%
- background-color: rgb(68, 35, 255)
-
- &.landmark-enqueued
- background-color: lighten(#F00, 20%)
- &.landmark-checking-out-code
- background-color: lighten(#FFA500, 20%)
- &.landmark-preparing
- background-color: lighten(#00F, 20%)
- &.landmark-running-tests
- background-color: lighten(#800080, 40%)
- &.landmark-saving-artifacts
- background-color: lighten(#A52A2A, 20%)
- &.landmark-tearing-down
- background-color: lighten(#000, 20%)
-
- &.status-waiting-to-be-run, &.status-complete, &.status-errored, &.status-aborted
- .icon
- background-image: none
+ padding: 0
+ min-height: 1em
+ // border: 1px dotted #B4B4B4
+ background-color: rgba(211, 211, 211, 0.4)
+ overflow: hidden
+ cursor: default
+
+ &, > *
+ line-height: 10px
+ height: 20px
+ > *
+ // float: left
+ position: absolute
+ top: 0
+ bottom: 0
+ overflow: hidden
+ margin: 0
+ padding: 0.5em 0
+ text-indent: 0.5em
+ white-space: nowrap
+ font-size: 90%
+ background-color: rgb(68, 35, 255)
+
+ &.landmark-enqueued
+ background-color: lighten(#F00, 20%)
+ &.landmark-checking-out-code
+ background-color: lighten(#FFA500, 20%)
+ &.landmark-preparing
+ background-color: lighten(#00F, 20%)
+ &.landmark-running-tests
+ background-color: lighten(#800080, 40%)
+ &.landmark-saving-artifacts
+ background-color: lighten(#A52A2A, 20%)
+ &.landmark-tearing-down
+ background-color: lighten(#000, 20%)
+
+ &.status-waiting-to-be-run, &.status-complete, &.status-errored, &.status-aborted
+ .icon
+ background-image: none
section.tests
.tests-completed

0 comments on commit 015f62d

Please sign in to comment.