1 Star 0 Fork 10

gaozhe / Genesis

forked from robinwu / kunlun-atp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Genesis - CLI based Automatic Test Framework

如果有对CLI(命令行)自动化感兴趣的同学,请注意这个项目。这个项目用一种可视化的方式监督命令发送的全过程。

这个项目基于B/S模式,后台Python3,前台Vue.js,有完整的安装过程,与示例代码,是CLI自动化测试不二之利器。

Image

Take an Example

Human could manually type commands in Terminal to get the Python version.

[root@genesis ~]# python3 --version
Python 3.6.7
[root@genesis ~]#

Genesis is able to do the exact same thing.

uut = lib.conn.UUT
uut.open()
uut.send('python3 --version\r', expectphrase=']#', timeout=60)
if 'Python 3.6.7' not in uut.recbuf:
    raise Exception('Did not found [Python 3.6.7], go to failure')

If print uut.recbuf here, it looks like:

>>> print(uut.recbuf)
python3 --version
Python 3.6.7
[root@genesis ~]#
>>>

以下是安装全过程:

Install CentOS 7

  1. During installation, choose GNOME Desktop & Development Tool
  2. Create Guest account genesis/genesis and set it as administrator

Login CentOS 7 with root

  1. Open a terminal

Install Python3.6

  1. Run yum install -y https://centos7.iuscommunity.org/ius-release.rpm
  2. Run rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
  3. Run yum install -y python36u python36u-libs python36u-devel python36u-pip
  4. Make sure python3 & pip3 work

Install Redis

  1. Run yum install -y redis

Install Apache

  1. Run yum install -y httpd
  2. Run yum install -y mod_ssl

Noted: later Genesis will re-config apache silently

Disable SELinux

  1. Run vi /etc/selinux/config, set SELINUX=disabled
  2. Reboot CentOS 7 System to take effect

Login CentOS 7 with root again!

  1. Open a terminal

Install Genesis

  1. Run cd /opt
  2. Run git clone https://gitee.com/andrew2015/genesis.git
  3. Run cd /opt/genesis & pip3 install -r requirements.txt
  4. Run cp /opt/genesis/certificate.crt /opt/
  5. Run python3 manage.py makemigrations & python3 manage.py migrate
  6. Run ln -s /opt/genesis/gen.py /usr/bin/gen
  7. Run chmod +x /opt/genesis/gen.py
  8. Run chown -R genesis:genesis /opt

Noted: If you meet any issue above, please raise your hand.

Enjoy Your Time

Change username to genesis from now on.

If you don't have code yet, please use example code:

  1. Run gen -h
  2. Run gen stop
  3. Run cp /opt/genesis/example/example.py /opt/prod/
  4. Run cp /opt/genesis/example/example_run.py /opt/prod/
  5. Run cp /opt/genesis/example/__init__.py /opt/prod/
  6. Run cp /opt/genesis/example/example_config.py /opt/config/

Start Work!

  1. Run gen start
  2. Open Browser - Google Chrome, use address - localhost or ip address

空文件

简介

基于Python的工业领域CLI自动化测试框架,与Labview的TestStand测试框架相似,是TestStand的Python实现。 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/debug666/genesis.git
git@gitee.com:debug666/genesis.git
debug666
genesis
Genesis
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891