![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
执行unittest 用例,输出json结构测试报告供web渲染或保存
输出结构体如下:
{
"test_list": [
{
"style": "Failed",
"name": "test_json_test_runner1.RunnerTestCase",
"doc": "",
"count": 2,
"Pass": 1,
"fail": 1,
"error": 0,
"cid": "c2",
"info": [
{
"index": "test_json_test_runner1.RunnerTestCase.test_success",
"name": "test_success",
"style": "Pass",
"desc": "",
"script": "success\n",
"status": "通过"
}
]
}
],
"count": 5,
"Pass": 2,
"fail": 2,
"error": 1,
"passrate": "40.00%",
"start_time": "2022-09-26 18:09:35",
"stop_time": "2022-09-26 18:09:36",
"duration": "0:00:01.003048"
}
pip install json-test-runner
jtr -c casepath
输出:
E test_error (test_json_test_runner.RunnerCase)
F test_failed (test_json_test_runner.RunnerCase)
ok test_pass (test_json_test_runner.RunnerCase)
F test_failed (test_json_test_runner1.RunnerTestCase)
ok test_success (test_json_test_runner1.RunnerTestCase)
Time Elapsed: 0:00:01.003048
save report file: /work/json-test-runner/test/report.json
from jsontestrunner import Runner
case_path = r'./test'
runner = Runner(case_path).run() # 执行case
print(runner.stream) # json结构体
runner.save() # 保存测试报告为json文件
FAQs
create json report with unittest
We found that json-test-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.