Skip to content

Commit

Permalink
Rename build step; added readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gleb-sevruk committed Dec 21, 2023
1 parent dd75283 commit 867acc6
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

jobs:
build-and-test:
run-integrartion-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/.pycrunch-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ engine:

pinned-tests: []
env:
PYCRUNCH_API_URL: http://localhost:11015
PYCRUNCH_API_URL: http://localhost:11016
66 changes: 61 additions & 5 deletions integration_tests/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
1. Run pycrunch-engine inside test_folder
2. Verify that test discovery is working (test_sample.py is discovered)
3. .pycrunch-config.yaml is created ?
4. What to test? Package? Source code? Both?
5.
# Integration test suite

This are basic test scenarios that uses `integration_tests/test_folder` as a test folder.

Then test suite communicates via web-sockets as a real client.

It checks that tests are discovered.

Also checks for combined and individual coverage (information that would be drawn in PyCharm Plugin)

## Running via docker:

```bash
cd integration_tests
docker-compose up --build
```

## How to develop/run tests locally

You will need multiple terminals to run all the components.

1. Starting engine manually
cd to folder `integration_tests/test_folder`
```
cd integration_tests/test_folder
pycrunch-engine --port 11016
```

In another terminal:

Create new environment (if not created yet) (ie: pycrunch_integration_tests310)
Install requirements:
```
pip install requirements.txt
```

2. Either run pycruch-engine again in `integration_tests` or use `pytest`

Option 1
```bash
# Using pycrunch-engine
cd integration_tests
pycrunch-engine --port 20111

# now connect to it via PyCharm menu (20111); You can use any port you want
```

Option 2
```
cd integration_tests
pytest pycrunch_integration_tests/pycrunch_engine_int_test.py
# Or run using PyCharm menu
```

Note: You will need to set PYCRUNCH_API_URL to http://localhost:11016

(this already hard-coded into .pycrunch-config.yaml configuration; so no need to do anything when using first option)

Or just hard-code it in `integration_tests/pycrunch_integration_tests/pycrunch_engine_int_test.py` `PYCRUNCH_API_URL` variable

0 comments on commit 867acc6

Please sign in to comment.