It's UWAweek 42 (2nd semester, week 12)

help5501

This forum is provided to promote discussion amongst students enrolled in CITS5501 Software Testing and Quality Assurance. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Displaying the 2 articles in this topic
Showing 2 of 143 articles.
Currently 12 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
1:56pm Tue 10th Sep, ANONYMOUS

Hi Arran, I'm unable to attend the labs this week so posting here. I wanted to ask about the stack class in lab 3. "Some possible characteristics: Does the array have zero elements in it, or one, or more? (This partitions the domain into 3.)" I'm a little uncertain about partitioning this as 0, 1 or more elements. Isn't having 1 element or more kinda the same partition as it doesn't change how the function would behave? Both would take remove the top element and return it. The difference is only in the output where 1 element would result in an empty array afterwards, while having more elements results in the object state having at least 1 element left. The input partition here feels a little grey to me as the partition isn't testing any different functionality here. I wanted to ask in such cases where the partition is a little grey, how do we go about deciding if something is a partition or not, such as in this case. Is it appropriate to base the partition on if the output object state results in a special case (empty array or still having at least 1 element), or should it be more based on the functionality of the method itself and if it would react differently (0 elements or >= 1 element resulting in 2 partitions). Thanks


SVG not supported

Login to reply

👍x1
helpful
2:11pm Wed 11th Sep, Arran S.

Hi,

I think you raise too many questions for me to easily answer all of them in a single post. I recommend dropping in on a lab next week, and discussing them with the teaching staff then.

Briefly, however: the documented behaviour of a method or class is the best starting point for coming up with partitions.

But there is nothing wrong with making use of other knowledge, such as

  1. Are there any special cases which might be particularly prone to programmer error?
  2. Based on reasonable inferences about how a class is likely implemented, could the state it ends up in (or starts in) be considered a special case?

If you make use of that knowledge, you might end up with slightly more partitions. Does that seem like a bad thing, to you? Unless the number of partitions is truly excessive, I can't see the harm, myself.

For many data structures – arrays, trees, stacks, heaps, etc. – if your code works for a structure of at least size 2, then it'll work for all sizes above that as well. But often, data structures of size 1 and 0 are special cases, and if programmers do make mistakes, it's likely to be for one of those sizes. If in this instance you think 1 isn't likely to be a special case, that's fine.

Cheers

Arran

ANONYMOUS wrote:

Hi Arran, I'm unable to attend the labs this week so posting here. I wanted to ask about the stack class in lab 3.

"Some possible characteristics:

Does the array have zero elements in it, or one, or more? (This partitions the domain into 3.)"

I'm a little uncertain about partitioning this as 0, 1 or more elements. Isn't having 1 element or more kinda the same partition as it doesn't change how the function would behave? Both would take remove the top element and return it.

The difference is only in the output where 1 element would result in an empty array afterwards, while having more elements results in the object state having at least 1 element left.

The input partition here feels a little grey to me as the partition isn't testing any different functionality here. I wanted to ask in such cases where the partition is a little grey, how do we go about deciding if something is a partition or not, such as in this case.

Is it appropriate to base the partition on if the output object state results in a special case (empty array or still having at least 1 element), or should it be more based on the functionality of the method itself and if it would react differently (0 elements or >= 1 element resulting in 2 partitions).

Thanks

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy