Category Archives: CS@Worcester

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

In this post, I’ll be reflecting on my group’s first sprint towards developing an Identity Access Management System for Thea’s Pantry. Our focus in Sprint 1 was really to get a base understanding of Keycloak and to implement a basic framework that would allow us to integrate Keycloak with the pre-existing systems.

Some of my personal work towards that goal was as follows:

GitLab

  • Documenting our low-level issues in GitLab and assigning them accordingly. Epic

Backend

Frontend

  • Containerize the fake frontend in a way that allows it to interact with the backend for testing purposes. Containerization

  • Create a dummy frontend with buttons that send mock JWTs to the new backend endpoint for testing purposes. This frontend sends encoded JWTs that contain user roles, receives the encoded role from the backend, and redirects to one of three corresponding landing pages accordingly. Commits: 1 , 2

We got off to a relatively slow start, but this was to be expected in learning a fully new technology. None of us had prior experience with Keycloak, so brainstorming and researching how we might want to implement an authentication / IAM flow was not easy. After some initial barriers, something that worked incredibly well for us was taking the extra time to really break down the work into very small issues or tasks for an individual to do. It was a lot easier to “add an endpoint to the openapi.yaml file” and “create openapi schemas for authentication tokens” than to “create a fake backend that can handle token validation”. Breaking things down as a group really helped us isolate specific tasks with clear deliverables.

Something that didn’t work quite as well for us was our current working agreement. I feel strongly that our working agreement must either be modified heavily or adhered to with more focus. We could take some time to more clearly outline the expectations of each member of the group, which in turn will give us something to reference when we have feedback for each other. We can also improve our communication as a team; our Discord is relatively inactive, and it would benefit us greatly if we each contributed more to the Discord.

Something I could personally improve is my followership. Though we are obviously a team and all working together, a deliberate part of the exercise is to designate a Scrum Master for the sprint and to loosely follow the Scrum framework. I was not the Scrum Master for Sprint 1, and I have a tendency to step up into a leadership role when the opportunity presents itself or when I feel there is something I am able to contribute that is not already present. I think this has its place and value, but I think it is also detrimental in some ways to both the team (as it weakens the team structure) and to the individual designated as Scrum Master (as it removes the opportunity for him or her to lead). I can definitely work on being a follower when it is my turn to be a follower.

The pattern from the book that I’ve chosen to include here is Exposing Your Ignorance. The pattern describes how we all like to be seen as confident and competent and are therefore slow to ask for help when we need it, but the better way forward is to admit our inadequacies and put in the open all of our missing knowledge, as that is a quicker, more effective, and more honest way to deliver. I selected this pattern because I feel it would have been extremely useful to our group throughout the sprint; there were many instances where I felt we each should have asked for more help if we needed it, and instead we tended towards remaining silent so as not to admit that we were lost, even if that meant not completing the work we needed to. I strongly disagree with that method of tackling a problem, and I feel that if we had read this pattern, we may have been much quicker to admit to each other that we need help with X, Y, or Z.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

On Structuring and Managing Test Cases

 In this post, I’ll be discussing a recent article I came across on the TestRail website, which can be found here. The post interested me because it dives deep into the importance of organizing and managing test cases effectively, a topic that we have been covering closely in class. As someone who does a lot of tests in various stages, this article gave me some good notes about how proper test case management can streamline the testing process and reduce the risk of overlooked issues.

One of the key takeaways from the article was the concept of structuring test cases with clear, concise steps and expected outcomes. This was notable because I’ve often seen situations where poorly written test cases lead to confusion or unnecessary delays. The article emphasized that each test case should be easily understandable, even for someone unfamiliar with the project, which makes a lot of sense. Clear test cases not only make the process smoother for current testers, but they also provide better documentation for future test cycles. I’ve personally benefited from this approach, especially when revisiting a project after some time has passed, well-written test cases make it easier to pick up where I left off, and they can even give hints (though these shouldn’t be needed) as to what the code is intending to do, and where some logical boundaries may exist.

The article also discussed the importance of categorizing test cases based on their purpose—whether they’re functional, regression, or exploratory tests. This structure helps ensure that each test type is executed at the appropriate stage and that nothing gets missed. In my experience, this kind of organization is crucial, particularly for large-scale projects where test cases can easily become scattered. I’ve found that when I categorize my tests according to at least some standard, I’m able to prioritize them better and avoid redundant testing, ultimately saving time and effort. It’s a simple but effective way to maintain focus on what really matters. My personal default is to follow the code chronologically / in the order of execution, as that is what feels most natural to me.

Another point I appreciated was the article’s advice on using test management tools, like TestRail itself, to keep track of test cases, execution results, and bugs. Granted, they are going to try to sell their own software, but it is still notable. Managing test cases manually in a spreadsheet or document can quickly become cumbersome, especially as projects grow, and using a product or software to handle this for you can be very beneficial.

Overall, this article reaffirmed the importance of a well-organized approach to test case management. As I continue testing processes and software, I’ll be more mindful of how I structure, categorize, and track my test cases, ensuring that testing is as efficient and effective as possible.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

On Structuring and Managing Test Cases

 In this post, I’ll be discussing a recent article I came across on the TestRail website, which can be found here. The post interested me because it dives deep into the importance of organizing and managing test cases effectively, a topic that we have been covering closely in class. As someone who does a lot of tests in various stages, this article gave me some good notes about how proper test case management can streamline the testing process and reduce the risk of overlooked issues.

One of the key takeaways from the article was the concept of structuring test cases with clear, concise steps and expected outcomes. This was notable because I’ve often seen situations where poorly written test cases lead to confusion or unnecessary delays. The article emphasized that each test case should be easily understandable, even for someone unfamiliar with the project, which makes a lot of sense. Clear test cases not only make the process smoother for current testers, but they also provide better documentation for future test cycles. I’ve personally benefited from this approach, especially when revisiting a project after some time has passed, well-written test cases make it easier to pick up where I left off, and they can even give hints (though these shouldn’t be needed) as to what the code is intending to do, and where some logical boundaries may exist.

The article also discussed the importance of categorizing test cases based on their purpose—whether they’re functional, regression, or exploratory tests. This structure helps ensure that each test type is executed at the appropriate stage and that nothing gets missed. In my experience, this kind of organization is crucial, particularly for large-scale projects where test cases can easily become scattered. I’ve found that when I categorize my tests according to at least some standard, I’m able to prioritize them better and avoid redundant testing, ultimately saving time and effort. It’s a simple but effective way to maintain focus on what really matters. My personal default is to follow the code chronologically / in the order of execution, as that is what feels most natural to me.

Another point I appreciated was the article’s advice on using test management tools, like TestRail itself, to keep track of test cases, execution results, and bugs. Granted, they are going to try to sell their own software, but it is still notable. Managing test cases manually in a spreadsheet or document can quickly become cumbersome, especially as projects grow, and using a product or software to handle this for you can be very beneficial.

Overall, this article reaffirmed the importance of a well-organized approach to test case management. As I continue testing processes and software, I’ll be more mindful of how I structure, categorize, and track my test cases, ensuring that testing is as efficient and effective as possible.

From the blog Mr. Lancer 987's Blog by Mr. Lancer 987 and used with permission of the author. All other rights reserved by the author.

J UNIT 5 TESTING

Recently, I dove into unit testing with JUnit 5 as part of my software development journey. Unit testing helps ensure that individual parts of a program work correctly by writing small, focused tests. JUnit 5 is the framework that is used to write these tests for Java applications, and it makes the process simple and efficient.

The first things first, JUnit 5 uses something called annotations to define test methods. The most important one is @Test, which marks a method as a test case. These methods test small units of code, like individual methods in a class, to make sure they return the expected results.

Here’s a simple example of a test method I wrote to check the area of a rectangle:

import static org.junit.jupiter.api.Assertions.assertEquals;

@Test
void testRectangleArea() {
Rectangle r1 = new Rectangle(2, 3);
int area = r1.getArea();
assertEquals(6, area); // Checking if the area is correct
}

In this case try and write these small test cases to check specific outputs, and if something doesn’t match what you expect, JUnit will let you know right away.

The Structure of a Test Case

There are three simple steps you can follow for each test case:

Assert: Compare the result with what you expect using something called an “assertion.

Arrange: Set up the objects or data you are testing.

Act: Call the method you want to test.

For example, here is another test to check if a rectangle is a square:

@Test
void testRectangleNotSquare() {
Rectangle r1 = new Rectangle(2, 3);
boolean isSquare = r1.isSquare();
assertFalse(isSquare); // Checking if it’s not a square
}

In this case, using assertFalse helps to confirm that the rectangle is not a square.

Common JUnit Assertions

JUnit 5 offers several assertion methods, and I quickly got the hang of using them. Here are a few that I used the most:

  • assertEquals(expected, actual): Checks if two values are equal.
  • assertFalse(condition): Checks if a condition is false.
  • assertTrue(condition): Checks if a condition is true.
  • assertNull(object): Verifies if something is null.

These assertions make it easy to confirm whether a piece of code behaves as expected.

Managing Test Execution

One thing that surprised me was that test methods don’t run in any specific order by default. This means each test should be independent of the others, which encourages better organization. I also learned about lifecycle methods like @BeforeEach and @AfterEach, which allow you to run setup and cleanup code before and after each test case. For example, @BeforeEach can be used to initialize objects before each test:

@BeforeEach
void setup() {
// Code to run before each test
}

In conclusion, Learning unit testing with JUnit 5 has been a great experience. It helps me write reliable code and catch bugs early. By writing small tests and using assertions, I can quickly confirm that my programs work as they should. JUnit 5 makes testing simple, and I look forward to improving my skills even more in the future!

If you’re new to testing like I was, JUnit 5 is definitely a great place to start!

From the blog CS@Worcester – MY_BLOG_ by Serah Matovu and used with permission of the author. All other rights reserved by the author.