Zadig 文档
Zadig
教程
博客
论坛
关于
中文英文
Zadig
教程
博客
论坛
关于
Zadig v4.2
Loading...
     编辑文档
     反馈问题
     社区讨论

    本页导航

    Apifox Test Platform Integration

    This article explains how to integrate the Apifox test platform with Zadig, execute automated tests, analyze test reports, and leverage Zadig's environment capabilities to shift testing left, empowering other roles to participate in quality assurance and effectively reducing the cost of identifying and fixing issues.

    # Apifox Integration

    # Step 1: Configure Continuous Integration in Apifox

    Access Apifox Automated Test → Continuous Integration, add a new continuous integration configuration and save the Apifox CLI command.

    # Step 2: Configure Node.js in Zadig

    Zadig system administrators can access system settings → Integration Management → Package Management, and add a new package.

    Apifox

    The specific configuration is as follows:

    • Name: node
    • Version: 20.5.1
    • Bin Path: $HOME/node/bin
    • Package address: https://nodejs.org/dist/v20.5.1/node-v20.5.1-linux-x64.tar.xz
    • Install Script: The content is as follows
    mkdir -p $HOME/node
    tar -C $HOME/node -xJf ${FILEPATH} --strip-components=1
    npm config --global set registry https://registry.npmmirror.com/
    
    1
    2
    3

    # Step 3: Configure the Test in Zadig

    Enter the project's test module, click Create Test to complete the test configuration.

    Configuration instructions:

    • Dependent packages: select node 20.5.1
    • Test script: Apifox Continuous Integration CLI, with the addition of --out-file=report, as shown below
    #!/bin/bash
    set -ex
    
    npm install -g apifox-cli --verbose
    apifox run https://api.apifox.cn/api/v1/projects/4893109/api-test/ci-config/445199/detail?token=xi6X-s2XjLMQlJOLwVbPxZ -r html,cli  --out-file report
    
    1
    2
    3
    4
    5
    • Html report file path: $WORKSPACE/apifox-reports/report.html

    Notification

    Refer to Notification Configuration.

    # Automated Test Execution

    Executing a Zadig test will automatically trigger Apifox to run automated tests. After the Zadig test is successfully executed, the execution status will be notified in the IM. The example using Feishu is as follows.

    Apifox

    # Test Report Analysis

    Click the test result link in the IM notification to view and analyze the test report.

    Apifox

    # Test Left Shift

    Configure workflows to orchestrate build, deployment (development environment), and test tasks. Refer to Workflows.

    Apifox

    After completing the feature development, submit a code change PR and select the PR change to execute the workflow, which will deploy the development environment and run automated tests. This allows you to identify and fix quality issues early in the development process.

    ← Apipost Test Platform IntegrationSonar Scan Best Practices→

    资源
    教程
    论坛
    博客
    公司
    关于
    客户故事
    加入我们
    联系我们
    微信扫一扫
    hello@koderover.com

    © 2026 筑栈(上海)信息技术有限公司 沪 ICP 备 19000177 号 - 1

    •  跟随系统
    •  浅色模式
    •  深色模式
    •  阅读模式