git_test 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +82 -0
- metadata +7 -6
data/README.md
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
# Git Test
|
2
|
+
|
3
|
+
Your test results...distributed
|
4
|
+
|
5
|
+
git\_test runs your tests and stores them in git. Use git_test to track
|
6
|
+
tests over multiple branches, runs, and teammates. Run git\_test when you pull and push
|
7
|
+
and you'll always know the state of your project!
|
8
|
+
|
9
|
+
## Install
|
10
|
+
|
11
|
+
$ gem install git_test
|
12
|
+
|
13
|
+
## Use
|
14
|
+
|
15
|
+
Before you push your code to a central repo run your tests
|
16
|
+
|
17
|
+
$ git_test push
|
18
|
+
|
19
|
+
After you pull new code down run your tests
|
20
|
+
|
21
|
+
$ git_test pull
|
22
|
+
|
23
|
+
Whenever you feel like it, run your tests
|
24
|
+
|
25
|
+
$ git_test run
|
26
|
+
|
27
|
+
|
28
|
+
To view the last test run on this branch
|
29
|
+
|
30
|
+
$ git_test show last
|
31
|
+
|
32
|
+
or simply
|
33
|
+
|
34
|
+
$ git_test show
|
35
|
+
|
36
|
+
To view all test reports on a branch you can run
|
37
|
+
|
38
|
+
$ git_test show all
|
39
|
+
|
40
|
+
2011-10-21T23:22:09Z_schneems_passed.html
|
41
|
+
2011-10-22T00:22:05Z_schneems_passed.html
|
42
|
+
2011-10-22T00:23:28Z_schneems_passed.html
|
43
|
+
2011-10-22T00:26:09Z_schneems_passed.html
|
44
|
+
2011-10-22T00:27:24Z_schneems_passed.html
|
45
|
+
2011-10-22T00:27:37Z_schneems_passed.html
|
46
|
+
2011-10-22T00:28:43Z_schneems_passed.html
|
47
|
+
2011-10-22T00:31:25Z_schneems_passed.html
|
48
|
+
2011-10-22T00:31:42Z_schneems_passed.html
|
49
|
+
|
50
|
+
To view a specific test report run:
|
51
|
+
|
52
|
+
$ git_test show 2011-10-22T00:22:05Z_schneems_passed.html
|
53
|
+
|
54
|
+
This implementation is set up to run rspec tests by default. There are additional arguments to configure on the command line if you want to run something else.
|
55
|
+
|
56
|
+
To get help:
|
57
|
+
|
58
|
+
$ git_test help
|
59
|
+
|
60
|
+
## The How
|
61
|
+
|
62
|
+
Git test works by making a temp directory, cloning your repository into that directory, running your tests on the cloned repo, and then writing the results to a branch `git_test_reports`. When done, the reports are pushed back to your local repo.
|
63
|
+
|
64
|
+
|
65
|
+
# Why
|
66
|
+
|
67
|
+
## CI Isn't Enough
|
68
|
+
|
69
|
+
On most projects everyone should run tests locally. The goal of git_test is to make running local tests as easy as possible and also to make them more useful. We do that by storing the result so you can compare branches and find out if another team-members pull request is ATP without having to ask.
|
70
|
+
|
71
|
+
Even better have your CI save its results in git_test.
|
72
|
+
|
73
|
+
|
74
|
+
## Shades of Red
|
75
|
+
|
76
|
+
For most test suites there are two colors Red (failed) and Green (passed) however testing isn't always so clear cut. The number of failures as well as the specific tests that failed matter too. While this might shock some diehard TDD folk, git_test is meant to be pragmatic. Taking a look at [quite a few popular Ruby Projects](http://travis-ci.org/) shows that you don't always have to have a green build 100% of the time to have a working product. When a test is failing it is important to know if that failure was introduced in the code changes or if it was pre-existing.
|
77
|
+
|
78
|
+
|
79
|
+
## Git Flow
|
80
|
+
|
81
|
+
This style of testing goes very well with [GitHub Flow](http://scottchacon.com/2011/08/31/github-flow.html) do your work in seperate branch and when you're ready to have it in production pull request then merge it into master. If for some reason your tests fail you can quickly use git_test to determine if you introduced the failure, or if it was already occurring on the master branch.
|
82
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Richard Schneeman
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-23 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -177,10 +177,11 @@ executables:
|
|
177
177
|
- git_test
|
178
178
|
extensions: []
|
179
179
|
|
180
|
-
extra_rdoc_files:
|
181
|
-
|
180
|
+
extra_rdoc_files:
|
181
|
+
- README.md
|
182
182
|
files:
|
183
183
|
- bin/git_test
|
184
|
+
- README.md
|
184
185
|
homepage: https://github.com/schneems/git_test
|
185
186
|
licenses: []
|
186
187
|
|