github.com/platonnetwork/platon-go@v0.7.6/cases/README.md (about)

     1  # PlatON-Tests
     2  This is an automated test project of the PaltON-Go
     3  
     4  ## Installation and operation dependencies
     5  Install the python 3.7 environment and configure pip, then execute the following command to install the dependency library:
     6  ```shell script
     7  pip install -r requirements.txt
     8  ```
     9       
    10  ## Run test
    11  
    12  ### Execute all test cases
    13  
    14  ```shell script
    15  pytest test_start.py --nodeFile "deploy/4_node.yml" --accountFile "deploy/accounts.yml" --initChain
    16  ```
    17  
    18  ### Execute at Multiple environment
    19  
    20  ```shell script
    21  pytest "case_path" --nodeFile "node_file_1,node_file_2" --accountFile "deploy/accounts.yml" --initChain -n 2
    22  ```
    23  
    24  Note: The number of node configuration files must be equal to the number of threads, and multiple node configuration files are separated by English ","
    25  
    26  ## pytest Command line argument
    27  
    28  --nodeFile "deploy/node.yml": Specify the node configuration file
    29  
    30  --accountFile "deploy/accounts.yml": Specify the account file for testing
    31  
    32  --installDependency:Indicates that the node needs to install the required dependencies, which is generally used during the first deployment; if it is not, it is no longer installed.
    33  
    34  --installSuperVisor:Indicates whether the node is installed with the supervisor service. It is usually used for the first deployment. If you do not have this option, it is no longer installed.
    35  
    36  ## Precautions
    37  Currently only supports Ubuntu environment deployment
    38  File storage requirements:
    39      Accounts.yml file, put in the deploy directory, platon binary file into deploy/bin, nodeFile into deploy/node
    40      Other files, put in the deploy/template template directory
    41  
    42  ### test case example:
    43  ```python
    44  import pytest
    45  @pytest.mark.P1
    46  def test_case_001():
    47      print("begin: test_case_001")
    48      SomeTxAPI("test_case_001")
    49      print("end: test_case_001")
    50  ```
    51