Skip to content

Commit 5522ac8

Browse files
committed
[FAB-3846]: Behave test feature file placeholders
This commits a number of placeholder tests that will be executed using the behave framework. This is only a small representation of the tests that will be written and executed. Execute these tests by typing: $ behave --tags=-skip or these tests will be executed when executing the runDailyTestSuite.sh file with the correct tags and will generate the results in junit with output files in the test/regression/daily directory according to the feature file name. I have also updated the .gitignore to ignore the xml files that are generated as a result of executing the tests for CI ingestion. Change-Id: I61fc34fd430aace182b8bdffe36d42ad73e2cc6f Signed-off-by: Latitia M Haskins <[email protected]>
1 parent 217b8f6 commit 5522ac8

File tree

7 files changed

+178
-53
lines changed

7 files changed

+178
-53
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ bddtests/volumes
3131
go-carpet-coverage*
3232
# make node-sdk copied files
3333
sdk/node/lib/protos/*
34+
# Test result xml files
3435
report.xml
36+
results.xml
37+
TESTS*.xml
3538
.settings
3639
.project
3740
.gradle

test/feature/bootstrap.feature

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright IBM Corp. 2017 All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
Feature: Bootstrapping Hyperledger Fabric
17+
As a user I want to be able to bootstrap my fabric network
18+
19+
@skip
20+
Scenario: FAB-3635: Configuration files generated correctly
21+
Given I have a bootstrapped fabric network
22+
When a user deploys chaincode
23+
Then the chaincode is deployed
24+
25+
@skip
26+
Scenario: FAB-3854: Ensure genesis block contains correct data
27+
Given I have a bootstrapped fabric network
28+
When a user deploys chaincode
29+
Then the chaincode is deployed
30+
31+
@skip
32+
Scenario: FAB-3856: Verify crypto material (non-TLS)
33+
Given I have a bootstrapped fabric network
34+
When a user deploys chaincode
35+
Then the chaincode is deployed
36+
37+
@skip
38+
Scenario: FAB-3858: Verify crypto material (TLS)
39+
Given I have a bootstrapped fabric network
40+
When a user deploys chaincode
41+
Then the chaincode is deployed

test/feature/endorser.feature

-13
This file was deleted.

test/feature/ft/orderer_at.feature

-36
This file was deleted.

test/feature/orderer.feature

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Copyright IBM Corp. 2017 All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
16+
Feature: Orderer Service
17+
As a user I want to be able to have my transactions ordered correctly
18+
19+
@skip
20+
Scenario: FAB-1335: Resilient Kafka Orderer and Brokers
21+
Given the kafka default replication factor is 3
22+
And the orderer Batchsize MaxMessageCount is 20
23+
And the orderer BatchTimeout is 10 minutes
24+
And a bootstrapped orderer network of type kafka with 3 brokers
25+
When 10 unique messages are broadcasted
26+
Then we get 10 successful broadcast responses
27+
When the topic partition leader is stopped
28+
And 10 unique messages are broadcasted
29+
Then we get 10 successful broadcast responses
30+
And all 20 messages are delivered in 1 block
31+
32+
@skip
33+
Scenario: FAB-1306: Adding a new Kafka Broker
34+
Given a kafka cluster
35+
And an orderer connected to the kafka cluster
36+
When a new organization NewOrg certificate is added
37+
Then the NewOrg is able to connect to the kafka cluster
38+
39+
@skip
40+
Scenario: FAB-1306: Multiple organizations in a kafka cluster, remove 1
41+
Given a certificate from Org1 is added to the kafka orderer network
42+
And a certificate from Org2 is added to the kafka orderer network
43+
And an orderer connected to the kafka cluster
44+
When authorization for Org2 is removed from the kafka cluster
45+
Then the Org2 cannot connect to the kafka cluster
46+
47+
@skip
48+
Scenario: FAB-1306: Multiple organizations in a cluster - remove all, reinstate 1.
49+
Given a certificate from Org1 is added to the kafka orderer network
50+
And a certificate from Org2 is added to the kafka orderer network
51+
And a certificate from Org3 is added to the kafka orderer network
52+
And an orderer connected to the kafka cluster
53+
When authorization for Org2 is removed from the kafka cluster
54+
Then the Org2 cannot connect to the kafka cluster
55+
And the orderer functions successfully
56+
When authorization for Org1 is removed from the kafka cluster
57+
Then the Org1 cannot connect to the kafka cluster
58+
And the orderer functions successfully
59+
When authorization for Org3 is removed from the kafka cluster
60+
Then the Org3 cannot connect to the kafka cluster
61+
And the zookeeper notifies the orderer of the disconnect
62+
And the orderer stops sending messages to the cluster
63+
When authorization for Org1 is added to the kafka cluster
64+
And I wait "15" seconds
65+
Then the Org1 is able to connect to the kafka cluster
66+
And the orderer functions successfully
67+
68+
@skip
69+
Scenario: FAB-3851: Message Payloads Greater than 1MB
70+
Given I have a bootstrapped fabric network
71+
When a user deploys chaincode
72+
Then the chaincode is deployed
73+
74+
@skip
75+
#@doNotDecompose
76+
Scenario Outline: FAB-3937: Message Broadcast
77+
Given a bootstrapped orderer network of type <type>
78+
When a message is broadcasted
79+
Then we get a successful broadcast response
80+
Examples:
81+
| type |
82+
| solo |
83+
| kafka |
84+
85+
@skip
86+
Scenario Outline: FAB-3938: Broadcasted message delivered.
87+
Given a bootstrapped orderer network of type <type>
88+
When 1 unique messages are broadcasted
89+
Then all 1 messages are delivered within 10 seconds
90+
Examples:
91+
| type |
92+
| solo |
93+
| kafka |

test/feature/FAB-3505.feature test/feature/peer.feature

+36-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Copyright IBM Corp. 2017 All Rights Reserved.
1+
# Copyright IBM Corp. 2017 All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,10 +13,11 @@
1313
# limitations under the License.
1414
#
1515

16-
Feature: FAB-3505 Test chaincode_example02
17-
As a user I want to run chaincode example02
16+
Feature: Peer Service
17+
As a user I want to be able have channels and chaincodes to execute
1818

19-
Scenario Outline: Test chaincode example02 deploy
19+
20+
Scenario Outline: FAB-3505: Test chaincode example02 deploy, invoke, and query
2021
Given I have a bootstrapped fabric network of type <type>
2122
When a user deploys chaincode at path "github.com/hyperledger/fabric/chaincode_example02" with ["init", "a", "1000" , "b", "2000"] with name "mycc"
2223
Then the chaincode is deployed
@@ -32,9 +33,40 @@ Scenario Outline: Test chaincode example02 deploy
3233
And "Peer1" comes back up
3334
When a user queries on the chaincode named "mycc" with args ["query", "a"] on "Peer1"
3435
Then a user receives expected response is 980
36+
Examples:
37+
| type |
38+
| solo |
39+
| kafka |
3540

3641

42+
Scenario Outline: FAB-1440: Test basic chaincode deploy, invoke, query
43+
Given I have a bootstrapped fabric network of type <type>
44+
When a user deploys chaincode
45+
Then the chaincode is deployed
46+
When a user queries on the chaincode
47+
Then a user receives expected response
3748
Examples:
3849
| type |
3950
| solo |
4051
| kafka |
52+
53+
54+
@skip
55+
Scenario: FAB-3861: Basic Chaincode Execution (example02)
56+
Given I have a bootstrapped fabric network
57+
When a user deploys chaincode
58+
Then the chaincode is deployed
59+
60+
61+
@skip
62+
Scenario: FAB-3865: Multiple Channels Per Peer
63+
Given I have a bootstrapped fabric network
64+
When a user deploys chaincode
65+
Then the chaincode is deployed
66+
67+
68+
@skip
69+
Scenario: FAB-3866: Multiple Chaincodes Per Peer
70+
Given I have a bootstrapped fabric network
71+
When a user deploys chaincode
72+
Then the chaincode is deployed

test/regression/daily/runDailyTestSuite.sh

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ DAILYDIR="$GOPATH/src/github.com/hyperledger/fabric/test/regression/daily"
88
echo "========== System Test Performance Stress tests driven by PTE tool..."
99
py.test -v --junitxml results_systest_pte.xml systest_pte.py
1010

11+
echo "========== Behave feature and system tests..."
12+
cd ../../feature
13+
behave --junit --junit-directory ../regression/daily/. --tags=-skip --tags=daily
14+
cd -
15+
1116
echo "========== Test Your Chaincode ..."
1217
# TBD - after changeset https://gerrit.hyperledger.org/r/#/c/9163/ is merged,
1318
# replace the previous 2 lines with this new syntax to run all the chaincode tests;

0 commit comments

Comments
 (0)