MopeSWTP-SS21 / MopeSWTP

MIT License
1 stars 0 forks source link

Defining and Implementing TestCases #58

Open manuEbg opened 3 years ago

manuEbg commented 3 years ago

As developer, I can run a test suite through gradle that contains unit and/or integration tests for all major features, so that I have examples for how the project should be used and can quickly find bugs that I introduced.

  • I can't remember where I have heard this tip, but i find that a good guideline is that each unit test should be a hypothesis about errors in your code. Something like "function f will fail, if I call it with a list that is not fully sorted as its first parameter". You should be able to formulate such a hypothesis as a short sentence for each test you write and actually write that hypothesis down as a comment in the test code. This will help you to define meaningful test cases and to quickly identify which new hypotheses you haven't covered yet.
  • Suggested test hypotheses:
  • Mo|E will fail to report non-existing top-level classes.
  • Mo|E will fail to report a non-existing class within an existing top-level class.
  • Mo|E will fail to report the use of a variable that was never defined.
  • The Mo|E server process will not shut down when it receives a shutdown request.
  • When two instances of the Mo|E server are started and initialized on the same machine, they will share an OMC instance. (Which may lead to unexpected behavior)
  • ... and many more regarding much more fine-grained issues within single methods in the code.

After @CptKaNe has our Testsuite ready, we want to fill it with tests:)

I think it would be good to create a single Issue for every Testcase. This Issue should:

CSchoel commented 3 years ago

I assume nothing could be done here in the last week, because the issue is blocked?

IlmarB commented 3 years ago

Indeed, we might need a daily scrum meeting to go ahead. What do you think? @CptKaNe @manuEbg

CSchoel commented 3 years ago

@IlmarB The issue is not blocked anymore. Does this mean that you are ready to go? I would think that at least a rudimentary test suite should be the highest priority among the remaining issues.

IlmarB commented 3 years ago

Yes. I will setup a rudimentary one.