reset password
Author Message
plakhan
Posts: 37
Posted 18:36 Jan 27, 2015 |

Hello Professor,

How do we have to test the test cases. Do we need to use the id of the user that we know already, or do we need to pass the username in method and then retrive the id and then move further.

cysun
Posts: 2935
Posted 21:02 Jan 27, 2015 |

This is what's said in the assignment:

In particular, the tests should verify that:

  • There is a user with the username jdoe1 and a user with the username jdoe2.

Do you think you should use id or username?

plakhan
Posts: 37
Posted 14:19 Jan 28, 2015 |

If we use the id then we can directly use the .find method and pass the id , in other case we would be required to write a query.

Please correct me if i am wrong.

Thanks

cysun
Posts: 2935
Posted 14:54 Jan 28, 2015 |
plakhan wrote:

If we use the id then we can directly use the .find method and pass the id , in other case we would be required to write a query.

Please correct me if i am wrong.

Thanks

Yes, write a query.

lmann2
Posts: 156
Posted 00:49 Jan 29, 2015 |

Do we need to provide test cases for all of our class implementations or just what's described in the assignment?  In particular, you mention that "It's up to you to decide what DAO methods you need, but note that you should take advantage of your model design and ORM to avoid creating unnecessary DAO methods....Create TestNG tests for the database access methods you created in the previous exercise." and then list particular cases just for the user class.  I understand that you want some sort of test case for each DAO, but considering all the possible cases seems impossible (i.e. we need to build more cases as we build the application).  Does that make sense?

nahmed5
Posts: 57
Posted 01:47 Jan 29, 2015 |

I believe, for the time being, we just need to find these three.

  • There is a user with the username jdoe1 and a user with the username jdoe2.
  • jdoe1 checked one checkpoint in his/her plan.
  • jdoe2 checked all the checkpoints in his/her plan

Time is so short that there's already no time for finding out any more test cases.

cysun
Posts: 2935
Posted 08:43 Jan 29, 2015 |
lmann2 wrote:

Do we need to provide test cases for all of our class implementations or just what's described in the assignment?  In particular, you mention that "It's up to you to decide what DAO methods you need, but note that you should take advantage of your model design and ORM to avoid creating unnecessary DAO methods....Create TestNG tests for the database access methods you created in the previous exercise." and then list particular cases just for the user class.  I understand that you want some sort of test case for each DAO, but considering all the possible cases seems impossible (i.e. we need to build more cases as we build the application).  Does that make sense?

As nahmed5 said, you just need to test the three cases listed in the assignment.

lmann2
Posts: 156
Posted 10:12 Jan 29, 2015 |

Good, but we do need to write all our DAO classes and DAOimpl classes from our model correct? 

cysun
Posts: 2935
Posted 11:23 Jan 29, 2015 |
lmann2 wrote:

Good, but we do need to write all our DAO classes and DAOimpl classes from our model correct? 

Yes, but only those that are needed for the test cases.

msargent
Posts: 519
Posted 19:14 Jul 16, 2015 |

Is this still true for our Homework 3, that we don't need to implement all of the methods we might use and test them, but just those needed for the mentioned tests?

cysun
Posts: 2935
Posted 19:53 Jul 16, 2015 |
msargent wrote:

Is this still true for our Homework 3, that we don't need to implement all of the methods we might use and test them, but just those needed for the mentioned tests?

Yes.

msargent
Posts: 519
Posted 20:40 Jul 16, 2015 |

That's great! I have already done some of the other methods/tests; should I keep them (the specifically required methods/tests will be in different files among other methods and tests; the grader would have to find them --- I hope that's not a problem)?