Skip to main content

Sharpshot will help you tests more easily! Created: Lijiawei. Version 1.0.1

Project description

精准测试

SharpShot

SharpShot

一个专注于精准测试的工具,旨在提供一套强大而灵活的工具集,帮助开发人员和测试人员进行精细化、全面化的测试。该工具集结合了高效的测试技术和先进的分析功能,使用户能够快速、准确地识别和解决软件系统中的问题。

介绍

分析 java 项目的两次 git 提交差异对项目的影响,精准定位受影响的接口 并生成调用链数据。

实现效果

效果图

原理

  1. 通过代码改动定位代码影响,并不断遍历受影响的类和方法直至找到最上层的controller层
  2. 通过javalang语法解析获取每个Java文件的import class extends implements declarators methods 等信息
  3. 通过unidiff 解析git diff信息(diff file, added_line_num, removed_lin_num)
  4. 然后根据文件增删的代码行去判断影响了哪些类和方法,不断遍历受影响的类和方法直至找到最上层的controller层
  5. 分析出两次commit id之间代码改动所带来的影响,输出受影响的接口 并生成调用链路图。

环境部署

要求python >= 3.9

pip install sharpshot

使用说明

  1. 首先获取 gitlab 的 access_token

https://git.openutx.com/-/profile/personal_access_tokens

  1. 运行
sharpshot pr=https://git.openutx.com/utx/utx-im/-/merge_requests/370 username=utxuser access_token=xxxx

pr 为 merge request 的地址,username 为 gitlab 用户名,access_token 为 gitlab 的 access_token

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharpshot-1.0.1.tar.gz (62.2 kB view details)

Uploaded Source

Built Distribution

sharpshot-1.0.1-py3-none-any.whl (63.4 kB view details)

Uploaded Python 3

File details

Details for the file sharpshot-1.0.1.tar.gz.

File metadata

  • Download URL: sharpshot-1.0.1.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for sharpshot-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a2f0b2c51a2ecd78b381eea7a114e8eb66d3cbc999f663ad7d826b84fa2eeb5e
MD5 ce049d26cad124b47704d59cd52f64aa
BLAKE2b-256 68422096a9757985e6dd6597ae1465f79098a9b002b642c9cd4a7986b02d4cb2

See more details on using hashes here.

Provenance

File details

Details for the file sharpshot-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sharpshot-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 63.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for sharpshot-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43e0b1bab626ce046342f011ce79b4623221e53f9f21c3d4b557622e7a197d84
MD5 6d3e7cb08de15bff09ab9b10a6efb8d2
BLAKE2b-256 152b5b2910ce8dcdacf76ca7da0ff1828148b2a403eedaf516076ccdb1eb3ecc

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page