sharyuwu / optimum-tilt-of-solar-panels

Other
0 stars 0 forks source link

VnV Question: Unit vs. System Test - CalculateOutput-id5 #40

Closed sorainsm closed 4 years ago

sorainsm commented 4 years ago

@smiths could you please clarify the following for me: what is the difference between a unit and system test?

@sharyuwu I think that the CalculateOutput-id5 is a unit test as it checks that the calculation is correct by feeding the function a bunch of inputs and seeing that they are individually correct. To my knowledge this only tests the one function, and not the overall behaviour of the system.

I think a systems test equivalent is verifying the output is formatted correctly or displayed correctly or matches the oracle, but the calculation itself seems like a unit testing issue. image image

sorainsm commented 4 years ago

@sharyuwu I think one of the issues might be with the word output; for system tests the output should be the output of the whole system.

I would think in this case to verify the output we'd need to just check the plots that you're going to be presenting to the user, and the format of the specific information (i.e. optimal tilt angle) since that's the "system output".

smiths commented 4 years ago

@sorainsm, I have not yet reviewed the VnV document by @sharyuwu, but from what is given in the issue, I believe you are correct. Systems tests test the entire software, with all of the modules acting together to get the outputs. The focus is on the inputs the user provides and the outputs that the software calculates. In the optimum tilt angle calculation the outputs will be the tilt angle(s) and the energy. Unit testing is for the test cases that test individual modules. The unit tests can only be written after the MIS is complete, since the MIS is needed to know the inputs and outputs for each module.

sharyuwu commented 4 years ago

@sorainsm Thank you for posting this issue @smiths Thank you for helping us clarify the definition of Systems testing. I will rethink the placement and the content of my document. Before I change anything, I will still leave this issue posted.

sharyuwu commented 4 years ago

This section is deleted from my SystemVnVPlan. I agree with @sorainsm. This test case should be in UnitVnVPlan instead of SystemVnVPlan. However, in UnitVnVPlan I also decided not to put this test case in it, because the test case is testing the correctness of my Day ADT Module, which I am implemented by using an external framework without modify it.

This is also been explained in my UnitVnVPlan. https://github.com/sharyuwu/optimum-tilt-of-solar-panels/blob/master/docs/VnVPlan/UnitVnVPlan/UnitVnVPlan.tex#L86