环境要求
- python >= 2.7
- pip
- node >= 10,设置环境变量保证
node -v正常输出
安装
npm config set registry https://registry.npm.taobao.org && npm config set @yunke:registry https://registry-npm.myscrm.cn/repository/yunke/npm i -g robot-grpcpip install RobotGrpc- 如果使用Windows系统的RIDE,需要重启机器
使用示例
robot脚本文件
*** Settings ***
Library RobotGrpc api.myscrm.cn:30051 https://git.myscrm.cn/jiangj01/panther-proto.git f-20180508-project b1wZx77sDx1YQPLyLww3
*** Test Cases ***
调用grpc方法
${res} = invoke grpc method article_project.ProjectArticleService.GetArticleInfo { "sid": "12323553" }
log ${res}
执行所有用例
run grpc cases ${CURDIR}/GetArticleInfo.js
指定运行特定用例
run grpc cases ${CURDIR}/GetArticleInfo.js case_name=正常 request={"正常":{"article_id":1}}
运行场景用例
run grpc cases ${CURDIR}/login.js
GetArticleInfo.js
const id = "article_project.ProjectArticleService.GetArticleInfo";
module.exports = {
id: id,
cases: {
正常: {
id: id,
name: "正常",
desc: 'desc',
request: {
"article_id": 0,
"yk_org_code": "string",
"project_id": 0
},
response: {
"article_id": 0,
"yk_org_code": "string",
"user_id": 0,
"title": "string", // 标题
"thumbnail": "string",
"publish_time": 0,
"record_info": {
"read_num": 0,
"read_person_num": 0,
"forwarded_num": 0,
"forwarded_person_num": 0,
"like_num": 0,
"like_list": [{}]
},
"project_id": 0,
"post_content": "string",
"status": 0
}
},
异常: {
id: id,
name: "异常",
desc: '',
request: {
"article_id": 0,
"yk_org_code": "string",
"project_id": 0
},
response: {
"article_id": 1,
"yk_org_code": "string",
"user_id": 0,
"title": "string", // 标题
"thumbnail": "string",
"publish_time": 0,
"record_info": {
"read_num": 0,
"read_person_num": 0,
"forwarded_num": 0,
"forwarded_person_num": 0,
"like_num": 0,
"like_list": [
{
}
]
},
"project_id": 0,
"post_content": "string",
"status": 0
}
}
}
}
login.js
const GetArticleInfo = require('./GetArticleInfo');
module.exports = {
id: 'login',
cases: [
GetArticleInfo.cases.正常,
GetArticleInfo.cases.异常,
],
}
Metadata
Release files for RobotGrpc 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| RobotGrpc-1.2.1.tar.gz | 3.1 kB | Without provenance | Details for RobotGrpc-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| RobotGrpc-1.2.1-py2-none-any.whl | Python 2 | none | any | Details for RobotGrpc-1.2.1-py2-none-any.whl |
Total release size: 6.2 kB
Release files / RobotGrpc-1.2.1.tar.gz
| Download URL | RobotGrpc-1.2.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebe061030b4f2f82f35c73f6662be59e4d53a38e794febd149ad8a3327202914
|
|
BLAKE2b-256 checksum How to use checksums |
6ea3324d1f6d4bf05795cbb192bb109068c7e404410d5cf66cff70ac0847e173
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15
|
Release files / RobotGrpc-1.2.1-py2-none-any.whl
| Download URL | RobotGrpc-1.2.1-py2-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
b5c339273c98b146deaa04cbcb46a2232a0b0f288f0b895076bf9747a92e6946
|
|
BLAKE2b-256 checksum How to use checksums |
07b7447472f7ce099689e7cb45ebec1924021964108e1cc1d6186c42b48de80a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15
|
Security for RobotGrpc 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.