github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/test/regression/weekly/systest_pte.py (about) 1 # Copyright IBM Corp. All Rights Reserved. 2 # 3 # SPDX-License-Identifier: Apache-2.0 4 # 5 6 ###################################################################### 7 # To execute: 8 # Install: sudo apt-get install python python-pytest 9 # Run on command line: py.test -v --junitxml results.xml ./systest_pte.py 10 11 import unittest 12 import subprocess 13 14 TEST_PASS_STRING="RESULT=PASS" 15 16 17 ###################################################################### 18 ### COUCHDB 19 ###################################################################### 20 21 class Perf_Stress_CouchDB(unittest.TestCase): 22 23 @unittest.skip("skipping") 24 def test_FAB3820_TimedRun_12Hr(self): 25 ''' 26 Standard Network: 2 Orderers, 3 KafkaBrokers, 3 ZooKeepers, 27 2 Certificate Authorities (CAs - 1 per Org), 2 Organizations, 28 2 Peers per Org, 4 Peers, 2 Channels, 2 ChainCodes, 8 total threads. 29 Launch network, use PTE stress mode to send invoke transactions 30 with 1K Payload concurrently to one peer in each organization 31 on all channels on all chaincodes, for the specified duration. 32 Query the ledger for each to ensure the last transaction was written, 33 calculate tps, remove network and cleanup. 34 ''' 35 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 36 self.assertIn(TEST_PASS_STRING, result) 37 38 @unittest.skip("skipping") 39 def test_FAB3821_TimedRun_72Hr(self): 40 ''' 41 Standard Network: 2 Orderers, 3 KafkaBrokers, 3 ZooKeepers, 42 2 Certificate Authorities (CAs - 1 per Org), 2 Organizations, 43 2 Peers per Org, 4 Peers, 2 Channels, 2 ChainCodes, 8 total threads. 44 Launch network, use PTE stress mode to send invoke transactions 45 with 1K Payload concurrently to one peer in each organization 46 on all channels on all chaincodes, for the specified duration. 47 Query the ledger for each to ensure the last transaction was written, 48 calculate tps, remove network and cleanup. 49 ''' 50 result = subprocess.check_output("../daily/TestPlaceholder.sh", shell=True) 51 self.assertIn(TEST_PASS_STRING, result) 52 53 @unittest.skip("skipping") 54 def test_FAB3822_Scaleup1(self): 55 ''' 56 Network: 2 Ord, 5 KB, 3 ZK, 2 Org, 2 PeersPerOrg, 2 Chan, 1 CC, 4 thrds 57 Launch network, use PTE stress mode to send 10000 invoke transactions 58 concurrently to a peer in each org on all channels on all chaincodes, 59 query the ledger for each to ensure the last transaction was written, 60 calculate tps, remove network and cleanup 61 ''' 62 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 63 self.assertIn(TEST_PASS_STRING, result) 64 65 @unittest.skip("skipping") 66 def test_FAB3823_Scaleup2(self): 67 ''' 68 Network: 2 Ord, 5 KB, 3 ZK, 2 Org, 2 PeersPerOrg, 2 Chan, 2 CC, 8 thrds 69 Launch network, use PTE stress mode to send 10000 invoke transactions 70 concurrently to a peer in each org on all channels on all chaincodes, 71 query the ledger for each to ensure the last transaction was written, 72 calculate tps, remove network and cleanup 73 ''' 74 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 75 self.assertIn(TEST_PASS_STRING, result) 76 77 @unittest.skip("skipping") 78 def test_FAB3824_Scaleup3(self): 79 ''' 80 Network: 2 Ord, 5 KB, 3 ZK, 2 Org, 4 PeersPerOrg, 4 Chan, 2 CC, 16 thrds 81 Launch network, use PTE stress mode to send 10000 invoke transactions 82 concurrently to a peer in each org on all channels on all chaincodes, 83 query the ledger for each to ensure the last transaction was written, 84 calculate tps, remove network and cleanup 85 ''' 86 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 87 self.assertIn(TEST_PASS_STRING, result) 88 89 @unittest.skip("skipping") 90 def test_FAB3825_Scaleup4(self): 91 ''' 92 Network: 4 Ord, 5 KB, 3 ZK, 2 Org, 4 PeersPerOrg, 8 Chan, 2 CC, 32 thrds 93 Launch network, use PTE stress mode to send 10000 invoke transactions 94 concurrently to a peer in each org on all channels on all chaincodes, 95 query the ledger for each to ensure the last transaction was written, 96 calculate tps, remove network and cleanup 97 ''' 98 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 99 self.assertIn(TEST_PASS_STRING, result) 100 101 @unittest.skip("skipping") 102 def test_FAB3826_Scaleup5(self): 103 ''' 104 Network: 4 Ord, 5 KB, 3 ZK, 3 Org, 4 PeersPerOrg (12 Peers), 8 Chan, 2 CC, 48 thrds 105 Launch network, use PTE stress mode to send 10000 invoke transactions 106 concurrently to a peer in each org on all channels on all chaincodes, 107 query the ledger for each to ensure the last transaction was written, 108 calculate tps, remove network and cleanup 109 ''' 110 result = subprocess.check_output("./TestPlaceholder.sh", shell=True) 111 self.assertIn(TEST_PASS_STRING, result) 112