Git Product home page Git Product logo

Comments (1)

hanxie-crypto avatar hanxie-crypto commented on September 23, 2024

补充一下需要添加单测的模块以及主要测试目标

模块名:

cli 【无配置指令执行】

模块使用说明

通常的使用示例如下
s cli s-demo -h ;// 查看帮助
s cli s-demo test // 测试空
s cli s-demo testParams -p '{"serviceName": ""}' // 单纯入参
s cli s-demo testParams -p '{"serviceName": ""}' -a accessName // 入参+执行秘钥别名
指令执行的时候会把用户输入的 参数 '{"serviceName": ""}' 以及 本地的秘钥信息,项目信息统一封装起来 传递给 组件的方法
最终的 数据格式应该符合 {props: {serviceName:'',credential:xxx,project:xxx,appName:xxx,command:xxx,args:xxx}}

测试目标

测试 cli-manager 类,通过 指定构造函数,并执行实例化的 cliManager 来判断结果是否符合预期
cliManager类构造参数 ,
interface CliParams {
component: string; //组件名,可以直接使用s-demo
command: string; // 测试的时候可传空,也可传 s-demo 的方法 如 test testParams
aliasName: string; // 根据本地秘钥别名添加
props: string // 如'{"serviceName": ""}'
}

模块名

init 【初始化模板】

使用说明

s init

测试目标

测试 init-manager 的 init 方法是否可以返回正确的组件包

模块名

set 【设置源】

使用说明

s set registry

测试说明

测试 源的连通性,以及设置好之后的结果

模块名

uitl 【公共工具】

使用说明

公共工具

测试目标

测试 command-util,common,handler-set-config,logger,storage,url-parser 的方法

模块名

specification【规范解析】

from serverless-devs.

Related Issues (20)

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.