All Projects → gleb-sevruk → pycrunch-engine

gleb-sevruk / pycrunch-engine

Licence: other
NCrunch inspired tool for continuous testing Python

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
Vue
7211 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to pycrunch-engine

Live Py Plugin
Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
Stars: ✭ 222 (+484.21%)
Mutual labels:  live-coding, pycharm
CtCI-with-Ruby-TDD
Cracking the Coding Interview with Ruby and TDD
Stars: ✭ 44 (+15.79%)
Mutual labels:  tdd
xv
❌ ✔️ zero-config test runner for simple projects
Stars: ✭ 588 (+1447.37%)
Mutual labels:  tdd
imooc
由浅入深全面掌握Django ORM开发的知识,以Django官方文档为依据,内容完整、准确、权威。视频学习地址:
Stars: ✭ 57 (+50%)
Mutual labels:  pycharm
kotoist
A VST plugin for live coding and algorithmic composition
Stars: ✭ 37 (-2.63%)
Mutual labels:  live-coding
GLAU BCSC0002
This is the official repository for the course Object-Oriented Programming BCSC0002 for GLA University 2019
Stars: ✭ 46 (+21.05%)
Mutual labels:  pycharm
tutorial-java-tdd
Tutorials about implementing TDD in Java
Stars: ✭ 66 (+73.68%)
Mutual labels:  tdd
estj
EstJ is my own test framework!
Stars: ✭ 13 (-65.79%)
Mutual labels:  tdd
apple-mango
Python BDD Pattern
Stars: ✭ 18 (-52.63%)
Mutual labels:  tdd
LetsGitHubSearch
Let'Swift 18 Workshop - Let's TDD
Stars: ✭ 60 (+57.89%)
Mutual labels:  tdd
curso-javascript-testes
Código-fonte do curso "Aprenda a testar Aplicações Javascript"
Stars: ✭ 60 (+57.89%)
Mutual labels:  tdd
react-atdd-playground
Template to (deliberate) practice your test-driven development skills.
Stars: ✭ 14 (-63.16%)
Mutual labels:  tdd
dl- -lb
d[ -_-]b
Stars: ✭ 23 (-39.47%)
Mutual labels:  live-coding
RCCpp DX11 Example
Runtime Compiled C++ example based on the Dear ImGui DirectX11 Example
Stars: ✭ 35 (-7.89%)
Mutual labels:  live-coding
clean-ts-api
API em NodeJs usando Typescript, TDD, Clean Architecture, Design Patterns e SOLID principles
Stars: ✭ 43 (+13.16%)
Mutual labels:  tdd
glicol
(Audio) graph-oriented live coding language and music DSP library written in Rust
Stars: ✭ 853 (+2144.74%)
Mutual labels:  live-coding
axon
Autogenerate Integration Tests
Stars: ✭ 49 (+28.95%)
Mutual labels:  tdd
tdd roman csharp
Kata: TDD Arabic to Roman Numerals with C#
Stars: ✭ 14 (-63.16%)
Mutual labels:  tdd
specific
Generate mocks and other test doubles using clojure.spec
Stars: ✭ 31 (-18.42%)
Mutual labels:  tdd
MarvelBrowser-Swift
Swift TDD Sample App
Stars: ✭ 31 (-18.42%)
Mutual labels:  tdd

Quick start

pip install pycrunch-engine

This engine depends on aiohttp, you may need to check cross-dependencies if your project also uses aiohttp

PyCrunch is written and supports Python 3.6+.

What Covers What

How to run:

Using PyCharm Connector extension

Download extension and install it from disk using PyCharm https://pycrunch-dist.s3.eu-central-1.amazonaws.com/pycrunch-intellij-connector-latest.zip

Open your project in PyCharm, and select "Run/Restart PyCrunch Engine"

Engine will be started automatically, and you will be able to see your test in PyCrunch plugin window

Manual (Without PyCharm)

In python project root, run:

pycrunch-engine

Optionally, port can be specified, in order to run more than one instance of engine:

pycrunch-engine --port=31234

Configuration file

Configuration file should be created prior to the first use of pycrunch-engine

Configuration file .pycrunch-config.yaml should be created and placed at project root

Minimum configuration

engine:
  runtime: pytest

Django configuration

discovery:
  exclusions:
  - front/
  - build/
  - test_discovery_specs_demo.py
engine:
  runtime: django
env:
  DJANGO_SETTINGS_MODULE: djangoapp.settings.local

Configuration File may be checked-in the to source control, to allow other developers to use engine.

Beta restriction

For Django, you probably need to disable logging, pasting following line in your settings file:

LOGGING_CONFIG = None

This issue is already on roadmap and will be addressed soon.

Django Support Details

Primary goal of extension is to run as fast as possible.

Default Django Test Runner creates new database each time when tests are run.

This leads to multiple problems:

  • Inability to run tests in parallel
  • Sometimes database got stale, and you need to type yes in terminal in order to destroy it
  • Each test run consumes more resources than it should, by creating database and applying migrations each time
  • Tests are not really unit-tests, sometimes you do not need database at all
  • Cannot run tests (or some code from unit-test) upon data stored in local database

As a result, pycrunch will use same database for running tests as manage.py runserver, without initializing temporary database.

Be careful when you run your suite for the first time, as it may corrupt data.

If your insist on using separate database, please create new django.setting module and pass it as environment variable to pycrunch-engine using .pycrunch-config.yaml file in env section, something like

engine:
 runtime: django
env:
 DJANGO_SETTINGS_MODULE: djangoapp.settings.pycrunch_local

Running in Docker

Some developers are using docker or docker-compose to set up environment and run development server in docker container

pycrunch-engine and extension support this use case.

All you need, is to map some port from docker to your local machine (ex. 5000) and put additional path-mapping configuration inside .pycrunch-config.yaml:

engine:
  runtime: django
env:
  DJANGO_SETTINGS_MODULE: djangoapp.settings.pycrunch_local
path-mapping:
    /code: /Users/neo/code/matrix-django-api

You will probably need to rebuild containers using docker-compose up --build in order for exposed port to appear

Then, enter inside docker container (ex:)

docker-compose exec web bash
# inside container:
pycrunch-engine
# will run on 5000 port by default

From PyCharm extension menu, select "Connect to Custom PyCrunch Engine"

Contacts:

https://pycrunch.com

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].