Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Notice: Creating folder will generate an empty file .keep, because not support in Git

Genesis - CLI based Automatic Test Framework




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.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')


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
  2. Run rpm -Uvh
  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
  3. Run cd /opt/genesis & pip3 install -r requirements.txt
  4. Run cp /opt/genesis/certificate.crt /opt/
  5. Run python3 makemigrations & python3 migrate
  6. Run ln -s /opt/genesis/ /usr/bin/gen
  7. Run chmod +x /opt/genesis/
  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/ /opt/prod/
  4. Run cp /opt/genesis/example/ /opt/prod/
  5. Run cp /opt/genesis/example/ /opt/prod/
  6. Run cp /opt/genesis/example/ /opt/config/

Start Work!

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

Comments ( 0 )

Sign in for post a comment


基于Python的CLI自动化项目 spread retract


No release




load more
can not load any more