lesstif / php-jira-rest-client

PHP classes interact Jira with the REST API.
Other
510 stars 263 forks source link

Test coverage #456

Open doppiogancio opened 2 years ago

doppiogancio commented 2 years ago

Hi, I just realized that tests are executed against an actual Jira endpoint and they are failing because, for example, I don't have an issue called TEST-155.

  1. Is this intended or did I wrongly configure the ENV file?
  2. I saw that some tests are 4-5 years old, could I collaborate and improve the test coverage?
lesstif commented 2 years ago

Hi @doppiogancio I'm sorry for the late reply.

you're a good point, Many test cases are hard coded in Unit tests, so it's not useful for most users.

  1. Many Issue Keys need set through Env files or run time argument.
  2. I always welcome user's PR :). so you can collaborate and improve all the test case!
doppiogancio commented 2 years ago

Hi @lesstif, I tried different approaches and now I understand why (maybe) people are discouraged from testing: curl it's not easy to mock.

Having an HTTP client would be much easier to increase test coverage, but replacing curl everywhere won't be that easy and fast.

I will come back to you with a proposal.