nus-cs2103-AY2021S1 / forum

20 stars 2 forks source link

Practice Paper Part 1 #498

Open chunyongg opened 3 years ago

chunyongg commented 3 years ago

image

In this question. I picked 2 as the answer: Not using camel case with the variable name, and the use of the magic string "reading". The answer given, however, was only 1 (not using camel case). Why is a magic string not considered a coding standard violation?

image

In this question, the justification given was that only unit tests are done by developers. I would like to clarify if this is the case among the options given, or for all types of testing, developers only do unit tests?

sudogene commented 3 years ago

image

In this question. I picked 2 as the answer: Not using camel case with the variable name, and the use of the magic string "reading". The answer given, however, was only 1 (not using camel case). Why is a magic string not considered a coding standard violation?

Duplicate: See #487 and #490

image

In this question, the justification given was that only unit tests are done by developers. I would like to clarify if this is the case among the options given, or for all types of testing, developers only do unit tests?

Not entirely sure what you mean but only developers do unit tests since they are the ones who know about the implementation. I guess a developer can do system/acceptance testing if it's something like dogfooding? (please correct me if I'm wrong)

junlong4321 commented 3 years ago

Regression testing is a form of system testing done by developers as well. So developers do still do other forms of testing apart from unit testing

damithc commented 3 years ago

I agree with the answers by @sudogene and @junlong4321

xinyee20 commented 3 years ago

image

For this question, my explanation was unit-testing requires tester to have knowledge of the methods within the class so the tester will have knowledge of the implementation of the code, that is why unit-testing is most likely to be glass-box testing. Is this explanation valid too?

damithc commented 3 years ago

For this question, my explanation was unit-testing requires tester to have knowledge of the methods within the class so the tester will have knowledge of the implementation of the code, that is why unit-testing is most likely to be glass-box testing. Is this explanation valid too?

Yes.

GeNiaaz commented 3 years ago

Can look at issue #493 @xinyee20