Giter Site home page Giter Site logo

buckyos / cyfs-test-lab Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 392.09 MB

The repository is created for testing CYFS functions and so on

Rust 8.49% TypeScript 78.12% JavaScript 11.41% CSS 0.01% HTML 0.09% Vue 1.26% Shell 0.01% Python 0.59% Batchfile 0.01% Less 0.01%

cyfs-test-lab's Introduction

cyfs-test-lab

cyfs-test-lab is a local physical machine test cluster set up to test CYberFileSystem (CYFS). The main purpose of the tests is to verify the correctness and performance of the BDT network protocol and CYFS protocol stack across different operating system platforms and network environments. This test cluster aims to simulate real-world usage scenarios to determine the performance and stability of CYFS under various conditions.

Testing environment

You can click view node details

Network environment design

The CYFS protocol mainly relies on the BDT network protocol stack for network communication. The BDT protocol is a P2P network protocol that implements NAT traversal, which allows hosts behind NATs to communicate with each other. Therefore, to test and optimize the performance of data transmission and connectivity in P2P networks using the CYFS protocol, it is necessary to simulate and test in a wide area network environment.

Therefore, we have constructed a multi-layer router structure. To simulate various NAT network environments, we have set up a multi-layer software router structure in cyfs-test-lab. Specifically, we have configured the following routers:

  • CYFS-TEST-LAB: Public 192.168.200.0/24
  • Router1: Full Cone 192.168.1.0/24
  • Router2: Port Restricted Cone 10.1.2.0/24
  • Router3: Symmetric 10.1.1.0/24
  • Router4: Symmetric 192.168.199.0/24
  • Router5: Full Cone/Port Restricted Cone 192.168.10.0/24
  • Router6: Port Restricted Cone/Full Cone 192.168.1.0/24
  • Router7: Symmetric/Full Cone 192.168.1.0/24
  • Router8: Symmetric/Port Restricted Cone 10.1.1.0/24

In the cyfs-test-lab network environment, other factors are also taken into consideration, including:

  • Setting up an IPv6 network environment to test the compatibility of the BDT protocol with IPv6 networks.
  • Setting up a NAT Port Mapping Protocol environment to verify the good P2P network connectivity of the BDT protocol when using public IPv4 addresses and port mapping.
  • Connecting some machines to multiple networks to test the ability of the BDT protocol to establish better performing tunnels.

These measures are aimed at testing and optimizing the data transmission and connectivity performance of the BDT protocol in various complex network environments.

Operating system coverage

  • Win7/Win10/Win11
  • Ubuntu20/Ubuntu22/CentOS8/Debian11
  • IOS/Android/HarmonyOS

CYFS-Stack Nightly environment

In the CYFS protocol, there is a concept of "Zone", where all devices belonging to one person are grouped into a zone, and permissions are isolated based on the Zone. OOD (Owner Operated Device) is equivalent to the user's personal server, running the DEC APP service side and storing the user's personal data. Devices running CYFS Browser, CYFS Chat, or any client running cyfs-runtime can be used as a Device.

In cyfs-test-lab, we simulated 4 Zones for testing purposes.

Testing framework

CYFS and BDT are new protocols, so in order to test them, we have designed a series of testing tools.

  • node-tester-server :

    • HTTP_FILE_SERVER :Save service package、test log、testcase file,and support downloading
    • agent_master_AgentServer : Implement a TCP proxy service,Provide sending control commands between testing nodes.
    • agent_master_AgentControl :Implemented a backend management system for the testing framework, which includes creating and executing testing nodes, test cases, testing software packages, testing tasks, viewing test results, and downloading logs.
  • node-tester-web : Front-end page for the testing framework's backend management system.

  • node-tester-data :Testing data collection and statistics service.

  • node-tester-app :Testing framework case execution client, implementing automatic updates for testing software packages and test cases, as well as distributed execution of test cases.

  • bdt-utils : To test BDT, a series of stub code and tools were encapsulated to facilitate testing.

  • bdt-unittest : BDT unit test code.

  • bdt-cli :The simple BDT client written runs in the service of node-tester-app

  • cyfs-driver :SUpport test CYFS Stack real machine environment and simulator environment

  • cyfs-test-dec-app :Test dec-app implemented by cyfs-sdk and related test cases of cyfs satck

Quick start

If you need to build a cyfs-test-lab testing environment, you can refer to the following documentation for setup:

Test Methods

Test case design and implementation

Test result statistics

cyfs-test-lab's People

Contributors

justtwo2 avatar lizhihongtest avatar morrison-yang avatar tracy101 avatar zwong91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cyfs-test-lab's Issues

How to config OOD service testing environment

OOD Service Testing Environment

Currently, there are two testing environments for the CYFS OOD service released by the official:

  • Nightly (1.1.0.XXX): Developers perform tests in Nightly environment, usually with new builds and integration tests conducted every day, as well as to verify bug fixes.
  • Beta (1.1.1.XXX): Currently used as the production environment, CYFS's ecosystem partners develop products in this version.

You can distinguish the testing environment 1-Beta and 0-Nightly through the third digit of the version number.

Installation Steps:

Configuring OOD Testing Version

By default, the Service version installed by OOD is the stable version configured by the official for testing purposes. You can update to the specified testing version through configuration.

Configuration file path: /cyfs/etc/ood-daemon/system-config.toml

[device]
# Configuring the specified service version, currently only supports three-digit version numbers.
service_version = "=1.1.752"
# Whether to enable pre-release, currently mainly used for internal testing. After being enabled, the preview version OOD service can be installed.
preview = false

Configuration Rules:

  • service_version = "*": Will follow CYFS official to update to the latest version of OOD service, and support preview version configuration.
  • service_version = "=1.1.76": Will switch to version 1.1.76, and OOD service will not be upgraded automatically, and support preview version configuration.
  • service_version = "default": Default configuration. If the service_version is not configured, it will follow CYFS official to update to the latest version of OOD service, and do not support preview version configuration.
  • The design of the semantic versioning and cargo's versioning is consistent, you can refer to https://semver.org/

Compatibility rules for three and four-digit version numbers: The third digit represents the nighlty/beta version identifier.

  • 1.1.0.76 represents version 1.1.76 in the nightly environment.
  • 1.1.1.76 represents version 1.1.76 in the beta environment.

How to View the Local OOD Service Version

Interface method to view the current version:

Configuring Custom Compilation Version

As a developer or tester, you may need to compile your own local version for testing purposes. We can configure our own compiled version through the following method (if no configuration is added, it will automatically be updated to the latest version in the configuration file during startup):

Add .lock file in ${cyfs_root}/services/gateway/current/

touch /cyfs/services/gateway/current/.lock

Viewing the Officially Released Version of CYFS

Currently, the released versions of the CYFS OOD service are all published on the CYFS network, and you can find the latest version on the Meta Chain of the Nightly and Beta environments:

Tool Compilation for Viewing OOD Service Version:
Currently, you can use the app-tool to view the OOD Service version or call the interface directly on the Meta Chain for inquiry.

// For the Nightly Environment, switch to the main branch code
git checkout main
// For the Beta Environment, switch to the beta branch code
git checkout beta 

cd CYFS/src
cargo build -p app-tool --release

Nightly/Beta environments currently have the same official configuration ID, and the difference lies in the app-tool client. Different versions of the client will query from Meta Chain in different environments.

Windows tool:

CYFS Service device id

  • Service List Id
Describe AppId
OOD Service List 9tGpLNnakyVtkriXdL6QvAt4Y9nGcW4SPbxkeNHLYDNJ
System App List 9tGpLNnPYrQBpwV6LAksdUptxBNFzRFtts1Acrh9DBij
  • Service App Id
name AppId
gateway 9tGpLNnQnReSYJhrgrLMjz2bFoRDVKP9Dp8Crqy1bjzY
chunk-manager 9tGpLNnabHoTxFbodTHGPZoZrS9yeEZVu83ZVeXL9uVr
file-manager 9tGpLNnDpa8deXEk2NaWGccEu4yFQ2DrTZJPLYLT7gj4
ood-daemon 9tGpLNnTdsycFPRcpBNgK1qncX6Mh8chRLK28mhNb6fU
app-manager 9tGpLNnDwJ1nReZqJgWev5eoe23ygViGDC4idnCK1Dy5

View OOD service command

  • Query the default version released by the current environment OOD Service:
app-tool.exe list show 9tGpLNnakyVtkriXdL6QvAt4Y9nGcW4SPbxkeNHLYDNJ
  • Query the default dec app released by OOD in the current environment
app-tool.exe list show 9tGpLNnPYrQBpwV6LAksdUptxBNFzRFtts1Acrh9DBij
  • Query the gateway list of the current environment version:
app-tool.exe app show 9tGpLNnQnReSYJhrgrLMjz2bFoRDVKP9Dp8Crqy1bjzY

Document Link

Document Link
Chiness

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.