Author Archives: therbsty

Edge Testing

hello again, The next testing I learned was edge testing which is a combinations of boundary and equivalence. It tests to make sure each class results in the correct output and tests for errors at the boundaries. It is better in every way except one it has many times more test cases then either of the others. There are two types normal edge testing and robust edge testing. Normal only tests the valid side of each edge and robust tests the valid and invalid side of each edge.

Example with two variables x1’s edges a,b,c,d and x2’s edges e,f,g

  • Normal
  • x1: {a, a+, b–, b, b+, c–, c, c+, d–, d}
  • x2: {e, e+, f–, f, f+, g–, g}
  • Robust
  • x1: {a–, a, a+, b–, b, b+, c–, c, c+, d–, d, d+}
  • x2: {e–, e, e+, f–, f, f+, g–, g, g+}

From the blog CS@Worcester – Tim's WebSite by therbsty and used with permission of the author. All other rights reserved by the author.

Equivalence Testing

hello All, after I leaned about boundary testing in class I learned about equivalence testing. Which I think does a better job at testing for correct output in a program. However it does not do as good a job of testing for edge errors like out of bounds errors and such. The idea of it is to split each variable into a range for every output. These ranges are called Equivalence classes. There are two different conditions for testing it normal/robust and weak/strong. Normal only tests valid the valid equivalence classes and robust tests the valid and invalid equivalence classes. Weak only tests each equivalence classes once and strong tests all combinations.

These are graphs of the different types

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

Equivalence Testing

hello All, after I leaned about boundary testing in class I learned about equivalence testing. Which I think does a better job at testing for correct output in a program. However it does not do as good a job of testing for edge errors like out of bounds errors and such. The idea of it is to split each variable into a range for every output. These ranges are called Equivalence classes. There are two different conditions for testing it normal/robust and weak/strong. Normal only tests valid the valid equivalence classes and robust tests the valid and invalid equivalence classes. Weak only tests each equivalence classes once and strong tests all combinations.

These are graphs of the different types

From the blog CS@Worcester – Tim's WebSite by therbsty and used with permission of the author. All other rights reserved by the author.

Boundary Testing

hi, so I have been learning about how boundary testing works in my testing class and the different types, weaknesses and strengths. The basic idea of boundary testing Is between valid and invalid inputs. There are also two different conditions for it normal and robust normal being that it only tests the valid side of the border and robust meaning that it tests the invalid side too. There is also worst-case which removed the single fault assumption. The single fault assumption is that only one variable can be on a border at a time.

This is a picture of normal

This is a picture of robust

These are pictures of worst-case the left is normal worst-case the right is robust worst-case

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

Boundary Testing

hi, so I have been learning about how boundary testing works in my testing class and the different types, weaknesses and strengths. The basic idea of boundary testing Is between valid and invalid inputs. There are also two different conditions for it normal and robust normal being that it only tests the valid side of the border and robust meaning that it tests the invalid side too. There is also worst-case which removed the single fault assumption. The single fault assumption is that only one variable can be on a border at a time.

This is a picture of normal

This is a picture of robust

These are pictures of worst-case the left is normal worst-case the right is robust worst-case

From the blog CS@Worcester – Tim's WebSite by therbsty and used with permission of the author. All other rights reserved by the author.

Junit 5 testing & testing with lambda expressions

hello all so in my software testing class I have learned about using junit 5 and using lambda expressions to test for exception throwing. I had used junit 4 before I learned this and I liked the way junit 5 makes it easier to make and test classes. I had an assignment to do testing an order system. I used the repeated test for testing auto incrementation. I also used lambda expressions to test for expressions and this was a ton easier then it was with junit 4. Below are two examples of the tests I wrote for that.

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

Using UML for a project

I have have been working on a big term project lately for my all classes. I when me and my group were planning what to do I decided to try use a UML to do the planning like I had learned about in my class a few months ago. It was big help in figuring about how to structure the program and figure out how make it work. It also help a lot with being able to communicate with group members so we could all work on it at same and it would still be compatible.

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

Template Design Pattern

For my blog this week I choose to write to about the template design pattern. Picked it because I was recently learning about what design patterns were. So I was google and and came along a list of different ones and I liked the template design pattern because it seemed to be useful and fairly simple so I picked it.

The article first talks about how the template design pattern is used for the base of an algorithm where the steps always happen in the same order and sometimes some or none of them are the same most of the time. Then they talked about an example of an algorithm to build a house were the steps are always first to build the foundation then to build the pillars. Next to build the walls and last to build the windows. They also said that these have to built in the same order every time. Then they started talking about the first class which was an abstract template with the first method being a method to build the house which its self called all of the other steps in the process which were abstract methods. They also said the since the method to build the house was the algorithm to build the house it should be final so it cant be changed. They also you leave the step methods unimplemented or not if they are mostly going to be the same. Then for each type of house you create a new class to build it extending the template class while overriding the unimplemented methods or any methods you need to change.

This design pattern helps with the repetition of having to type the algorithm over and over for each subsequent class you make. It also lets you make reuse so of the steps if they never change. It does have some disadvantages though like how you cant change the order of the main algorithm and that you have to override most of the methods everything. So even if several of the implementations use the same step you still have to rewrite them anyway. I learned a lot from this article first of all I learned a completely new type of design pattern. I think this pattern is very useful especially with algorithms as they said. I also learned just by looking at the list on the website that were far more types of design patterns then I originally thought.

Template Method Design Pattern in Java

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

UML Diagrams

During the first week of my CS 343 class we were learning about reading and writing uml diagrams. I found a article on lucid chart called UML Class Diagram Tutorial which was a big help. Its URL can be found below for anyone who is interested. It talked about hiw “Class diagrams are one of the most useful types of diagrams in UML as they clearly map out the structure of a particular system by modeling its classes, attributes, operations, and relationships between objects”. It also said how a class is made up of three block the top being for the name of the class. It also says how the middle is for attributes such as class variables. It also says how the bottom is for all the methods of the class. It also talks about the member access modifiers like how public is a “+” and private is a “-” and and static is underlined . It also talked about some I did not know about from class like how protected is “#” and package is “~” and derived is a “/” . It also talked about how to do Interfaces and Enumerations. It also had some good examples of them. Most of this though I already understood. What really helped me was the explanation of the different connections between classes and interfaces and such. It said how Inheritance is “the process of a child or sub-class taking on the functionality of a parent or super class, also known as generalization. It’s symbolized with a straight connected line with a closed arrowhead pointing towards the super class” and had an example. This connection I was not to bad with already though. What really helped me was the explanation of association and why only one side had a arrow on it sometimes which I had trouble with in class. The first type that was talked about was a Bidirectional association. They said this was “ The default relationship between two classes. Both classes are aware of each other and their relationship with the other. This association is represented by a straight line between two classes.” The second one they talked about was a Unidirectional association they said this was “a slightly less common relationship between two classes. One class is aware of the other and interacts with it. Unidirectional association is modeled with a straight connecting line that points an open arrowhead from the knowing class to the known class.”. I really learned a lot from this article and will continue to refer to it in the future if I need to be reminded about how to write a UML or how to read one.

https://www.lucidchart.com/pages/uml-class-diagram

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.

Introductory Blog Post

Hello everyone my name is Tim Herbst. I am currently a student at Worcester state pursuing a degree in computer science. I will be using this blog to share some of knowledge i gain during my education .

From the blog CS@Worcester – Tim’s Blog by therbsty and used with permission of the author. All other rights reserved by the author.