GitXplorerGitXplorer
d

kata-hr-db

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
debb5ccfec8ecaecaf19a2a0af6a47a25135fc71

Better playwright tests in java

ddmerejkowsky committed 12 days ago
Unverified
d370758e395fe3c16a3c2d4f1b3f39852fc91722

All instructions in the same place

ddmerejkowsky committed 12 days ago
Unverified
8940ec6f96bc28fc33c8bdffff855a621b5bded1

Update instructions

ddmerejkowsky committed 12 days ago
Unverified
0fc4f31823a83a0f291bfcc3b8c2f3ac73e7c829

Remove bad print()

ddmerejkowsky committed 12 days ago
Unverified
5356ba2c7d8a2fac1cbf3c8d554e8a107e1847e4

Bump gunicorn

ddmerejkowsky committed 12 days ago
Unverified
e7651c062f0a3cd65b8c515c7861315c500042eb

No debug for you ...

ddmerejkowsky committed a month ago

README

The README file for this repository.

HR Manager Web Application

I'm a Web application with (almost) no tests.

Test me!

Running the backend

Install Python >=3.12 and poetry

Go to the backend/.env file with this contents:

DJANGO_SECRET_KEY=this-is-an-unsafe-secret
DJANGO_DEBUG=true
$ poetry install
$ poetry run python manage.py migrate
$ poetry run python manage.py runserver

Part 1 - manual testing

Do not look inside the backend/ folder yet - you're doing black-box testing at this point.

Step 1

Do some manual, exploratory testing first.

Create a test plan and run it manually.

Step 2

Put all the bugs you find into a bug tracker

Part 2 - end-to-end testing

Step 1

  • Open the folder corresponding to your prefer programming language
  • Install and configure playwright
  • Install a browser that playwright can control:
playwright install chromium

Step 2

  • Use playwright codegen to automate the steps from one your tests in the test plan.

  • Add the code to the git repository without any changes.

  • Modify the code so that it can run.

Step 3

  • Make sure you can run the already existing end-to-end add-team test

Once it's running, add tests for all the bugs found during step 1.

Notes:

  • Use a fixture to reset the database
  • Make sure to use the "Page Object Model" design pattern.
  • Do not issue POST or GET requests directly outside the browser (you'll do that in a later step)

Step 4

Compare the code written using the Page Object Model with the one playwright automatically generated.

Part 3 - integration tests

Step 1

  • Make sure you can run the integration test for add-team.

You'll see it only works when the database contains no other team.

Find a strategy to handle clean separation between tests while still using the database.

Once your done, rewrite the tests from part 2 using raw http request and SQL queries.

Some clues:

Use DBEaver to inspect the contents of the database by opening the file db.sqlite3.

Use your browser dev extensions to look at the payload of the POST requests

The tables used by the backend code can be created and dropped using the up and down sql scripts respectively.