TestCube is a platform to manage and monitor automation test run and results, it provides a friendly web interface which is build with Python and Django.
Let me take 1 minute to describe TestCube...
Why ? - To manage and analyze automation test results efficiently.
What ? - It is web portal to deal with stuff like test runs, test cases, test results and test reports.
So you have to learn about its client or API later.
1. Manage test run in one page
2. Analyze and view test reports
3. Tag test case and show coverage
4. Analyze test result in a nice way
For more features, please refer to issues page or todo list.
Basically, there are 3 steps to run TestCube:
- Deploy a TestCube server.
- Install TestCube client to upload test results files. (*.xml)
- Review and analyze results from TestCube website.
TestCube is built on Python, but it does not limit clients and users are Python-based.
- TestCube Server: https://github.com/tobyqin/testcube
- TestCube Python Client: https://github.com/tobyqin/testcube-client
I assume you have basic knowledge with Python and Django, or it is not easy to help you on the way.
1. Fetch the code
Clone or download this repo into your local workspace.
git clone https://github.com/tobyqin/testcube.git
2. Update settings based on your demands
Before getting started, you should review and update
/testcube/settings.py to meet your needs.
You might want to update:
STATIC_ROOT and more.
3. Follow setup steps
To start a Django website, you have to do things like below:
- Install requirements.
- Create database scheme.
- Load default data. (optional)
- Create super user. (to administrate the website)
- Collect static files. (required for production deployment, skip it during development)
- Start the web server.
To accomplish above steps, open a command window and follow me:
# supposed you have python3 installed and added in PATH cd /path/to/testcube # step 0. Create virtual environment for this app # https://virtualenv.pypa.io/en/stable/userguide/ # step 1. Install requirements pip install -r requirements.txt # step 2. Create database (will create a default super user: admin/admin) python manage.py migrate # step 3. create super user (optional, see step 2) python manage.py createsuperuser # step 4. collect static files (optional, for deployment) python manage.py collectstatic # step 5. start the web server (for site preview or development) python manage.py runserver
Once the server started, you should be able to visit TestCube at http://127.0.0.1:8000/.
4. Production Deployment
Basically, you can follow steps in
/scripts/ folders to deploy TestCube, for more detail,
please refer to Django official deployment documents.
On target server, A best practice is setting environment variables as example.
This project is still under development, welcome to fork and send pull request.
Install Dev requirements
Install additional dependencies to setup dev environment.
pip install -r requirements-dev.txt
Before send pull requests, please add relevant unit tests and make them passed.
python manage.py test
To check your test coverage, and generate an HTML coverage report, please run:
coverage run manage.py test coverage html open htmlcov/index.html
Deployment with Docker
To simply start testcube with docker, do it like this:
cd path/to/testcube docker build -t testcube . docker -d -p=4000:4000 testcube # now visit testcube at http://localhost:4000
It works with Postgresql and Nginx on port 4000, if the port is allocated or you want to use different database, update the docker-compose.yml.
Note: you should update settings & related environment variables at first!
cd path/to/testcube docker-compose up
More questions about TestCube will be answered at FAQ.
You can find an xmind file in
/docs folder, that is the original design and prototype.