Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support live testing for developers #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aik099
Copy link
Member

@aik099 aik099 commented Jan 1, 2025

The library has unit tests:

  • we test, that the network layer (communication between library and server) behaves as expected;
  • we test, that we send the correct data to the Jira.

The problem

We don't test if an API request built by the library will actually behave as expected on the Jira side. Testing stuff like that is of course out of the scope, because if we've made an API call according to the Jira REST API docs, then we believe it will work as expected.

The solution

Before sending a PR a developer must confirm, that the added code will actually produce the correct results. Here is why the ApiTest::testLive test was added.

It works like this:

  1. copy/paste phpunit.xml.dist into phpunit.xml
  2. in the phpunit.xml specify LIVE_TEST_ENDPOINT, LIVE_TEST_USERNAME and LIVE_TEST_PASSWORD environment variables (example code is already placed in there; just uncomment it)
  3. write the desired LIVE test in the ApiTest::testLive method
  4. run it
    .

Copy link

codecov bot commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.17%. Comparing base (c94011b) to head (8cccce6).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #221   +/-   ##
=========================================
  Coverage     63.17%   63.17%           
  Complexity      208      208           
=========================================
  Files            10       10           
  Lines           687      687           
=========================================
  Hits            434      434           
  Misses          253      253           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aik099 aik099 force-pushed the live-testing-feat branch 2 times, most recently from f788382 to 7fa0092 Compare January 1, 2025 19:55
@aik099 aik099 force-pushed the live-testing-feat branch from 7fa0092 to 8cccce6 Compare January 2, 2025 19:33
@aik099 aik099 modified the milestones: v2.0.1, v2.0.0 Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant