Commit 519460a 1 parent 1dfdee5 commit 519460a Copy full SHA for 519460a
File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,14 @@ Use the following sequence to run all unit tests
21
21
cd $GOPATH/src/github.com/hyperledger/fabric
22
22
make unit-test
23
23
24
+ To run a subset of tests, set the TEST_PKGS environment variable.
25
+ Specify a list of packages (separated by space), for example:
26
+
27
+ ::
28
+
29
+ export TEST_PKGS="github.com/hyperledger/fabric/core/ledger/..."
30
+ make unit-test
31
+
24
32
To run a specific test use the ``-run RE `` flag where RE is a regular
25
33
expression that matches the test case name. To run tests with verbose
26
34
output use the ``-v `` flag. For example, to run the ``TestGetFoo `` test
@@ -31,6 +39,8 @@ call/excecute
31
39
32
40
go test -v -run=TestGetFoo
33
41
42
+
43
+
34
44
Running Node.js Unit Tests
35
45
~~~~~~~~~~~~~~~~~~~~~~~~~~
36
46
Original file line number Diff line number Diff line change 1
1
Testing
2
2
=======
3
3
4
+ Unit test
5
+ ~~~~~~~~~
6
+ See :doc: `building the fabric <dev-setup/build >` for unit testing instructions.
7
+
8
+ See `Unit test coverage reports <https://jenkins.hyperledger.org/view/fabric/job/fabric-merge-x86_64/ >`__
9
+
10
+ To see coverage for a package and all sub-packages, execute the test with the ``-cover `` switch:
11
+
12
+ ::
13
+
14
+ go test ./... -cover
15
+
16
+ To see exactly which lines are not covered for a package, generate an html report with source
17
+ code annotated by coverage:
18
+
19
+ ::
20
+
21
+ go test -coverprofile=coverage.out
22
+ go tool cover -html=coverage.out -o coverage.html
23
+
24
+
25
+ System test
26
+ ~~~~~~~~~~~
27
+
4
28
[WIP] ...coming soon
5
29
6
30
This topic is intended to contain recommended test scenarios, as well as
You can’t perform that action at this time.
0 commit comments