Author Archives: kbourassa18

System Testing

The three levels of the software testing process are unit testing, integration testing, and system testing.
Unit testing tests the isolated functionality of each individual unit. 
Integration testing tests the functionality of combining units to ensure they work together as intended. 
System testing tests the software as a whole. 

In my reading about integration testing, I noticed that at some point during this testing phase the system should be tested as a whole. Is system testing just a redundant and more in depth testing methodology focused on this? Sean Coughlin answers this question in his blog “Understanding System Testing in Software Engineering” (https://blog.seancoughlin.me/understanding-system-testing-in-software-engineering) by providing a clear understanding of what system testing is and what it tests for. 

System testing is a software testing phase that assesses a fully integrated software system’s compliance with requirements, covering both functional and non-functional aspects. These non-functional aspects are what makes system testing so comprehensive compared to integration testing when testing the software as a whole. Examples of non-functional testing include; performance testing, security testing, and usability testing.

Coughlin uses an e-commerce website as an example to illustrate system testing and each of its components. Functional testing ensures each feature of the website works as intended, Performance testing ensures the website still works even during peak user times. Security testing ensures the website is robust against cyber threats and that data is handled correctly. Usability testing ensures the website is user-friendly across multiple platforms.

Testing frameworks exist that allow for automated test such as simulating heavy loads for performance testing. User testing on the other hand is typically done manually as it focuses on a user’s experience. This means having a range of people, from developers to stakeholders, testing end-to-end use of the software. 

Overall system testing is testing an application for real world use. This goes much deeper than just functionality of the software. This is the last phase of testing before the software is released to the final product for acceptance testing. Meaning it is important that developers properly system test to identify and fix issues during this phase.

The scope for system testing is even larger than I could have imagined. Coughlin states, “I like to think of system testing as more of an umbrella term that captures lots of different testing forms.” which perfectly describes how system testing encapsulates testing all aspects of a software.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Integration Testing

After recently reading up on unit testing and having some exposure to it in class, I figured the next step would be to look at integration testing. With plenty of blogs to choose from, all giving pretty similar information on integration testing, I chose to highlight the blog published by Katalon (https://katalon.com/resources-center/blog/integration-testing). This blog provides more information into certain aspects of Integration testing, such as explaining some differences between low- and high-level modules. This extra insight helps piece together a lot of the questions I had while reading other blogs on the topic.

Integration testing is a software testing method that involves combining individual units together and testing how they interact. The main purpose of integration testing is to ensure that each module works together as intended and does not create any unforeseen bugs. Each module should be individually unit tested before integration testing.

Integration testing helps identify bugs that may not be seen in unit testing. These bugs can come from a multitude of places. Inconsistent logic between different programmers, modifying code, data being transferred incorrectly, poor exception handling, and incompatible versions may all lead to bugs that only appear during integration testing. Integration testing helps identify these bugs, and depending on what model is being implemented, may easily help find the locality of the bug.

There are two main approaches to performing integration testing: the big bang approach, and the incremental approach. The big bang approach involves integrating and testing all modules at once. This is great for small systems that do not have much complexity however, this means finding the location of a bug will be harder with a complex system. When systems become larger and more complex it may be best to switch to incremental testing. This is an integration testing method where modules are combined and tested in smaller groups. These groups continue to combine with other groups until the system is tested. Three common incremental integration testing methods are the bottom-up approach, top-down approach, and a hybrid approach. Bottom-up starts by integrating the lowest level modules together before adding higher level modules. Top-down does the opposite where it starts by integrating the highest-level modules before adding the lower ones in as tests pass. The hybrid, also known as the sandwich approach, is a combination that may alternate between testing the top level and bottom level components.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

The Deep End

This pattern describes growing your skills by challenging yourself with any opportunity that is given to you. Whether it’s done through taking on bigger or more complex problems or working with larger teams, there is always something to learn by trying something new. This also means seeking out projects to work on to build a portfolio and expand your skills.

For someone who started programming java in 2007, my portfolio is pretty barren. This comes down to two factors. Lost old files, and failing to start new projects. This pattern is one that I can definitely relate to the problem of feeling like I have plateaued. My eyes are opened to the truth as I get more exposure to the world of software development. If I am going to gain new skills I need to actively seek projects that push the boundaries of what I already know. I have always wanted to develop an application, but without any clear idea of what kind of application I wanted to make. This has always paralyzed me from actually learning how to develop an application. There are two clear solutions I can think of right now based off of two other patterns I have written about in the past. Following the pattern of “Find Mentors,” I could have sought out the guidance of a mentor and asked for ideas for projects that would develop my skills. The second pattern of “Breakable Toys,” gives me the option of just making an application for the sake of having a tool I can use. Making a breakable toy for an application would be a great way for me to jump into the deep end as far as pushing my knowledge of software development.

The other part of challenging myself is working with larger teams. Up until last year all of the projects I have worked on have been solo. Last semester, where I was partnered with another classmate, was one of my first exposures to developing large projects with someone else, and the challenges that come with it. Teamwork is crucial as anywhere I go in my career I will be working on a team, so being able to work together and communicate are important skills to develop. And just like learning from actually developing code, these skills will be built by actually working in larger teams.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Sprint 2 Retrospective

I felt like I went into this sprint confident that the tasks we planned to approach at the start would go well based off of what we learned from the first sprint. To start the sprint off our team met with Team 1 on Discord. We discussed what we learned about frontend testing, including vues and how to build a frontend in gitpod. This is where that confidence was immediately squashed when I began to realize the depth involved with setting up all the linters for a frontend and linting all of the files.

During the entirety of the sprint I was stuck tackling this one issue; setting up linters in GuestInfoFrontend. This issue was originally weighed by the team as a 2 based on everyone linting their repositories in the previous sprint. Come to find out, linting a fully built front end can take some time.

The initial Issue I ran into was understanding how to enable each linter in the pipeline. The main reason I failed to properly lint the GuestInfoFrontend in the previous sprint was that I never enabled the linters. To make sure I had every linter I needed I read the documentation for each linter and picked ones that linted any file that existed in the frontend. The linters I used were alexjs, cspell, hadolint, lint-package-json, markdown-link-check, markdownlint-cli2, shellcheck, spectral, eslint, htmlhint, and style lint. 

Eslint, htmlhint and style lint didn’t end up working with the pipeline and were removed. Issues were made under each of their respective repositories detailing the error message. Eslint still worked locally, so linting was still able to be done to the files.

As for the other linters, I was able to learn a decent amount about configuring rules for each one of them. This includes understanding what to name the config file, how to format the rules, and what rules exist. Unfortunately It turns out that the rules I created are only checked locally, which makes sense. So my files would still fail the pipeline without the proper lint ignore comments. This was something I tried to avoid at all cost, as it just feels like a cheap and easy fix. That being said I look forward to maybe taking my proposed rules further up the pipeline.

The team’s communication was again the best part of the sprint. There were times where one of us would get stuck or fall behind. Having them communicate what is going on allows the rest of the team to be aware of the situation and adjust accordingly. 

As a team we have noticed that there have been issues that essentially have child issues. These child issues get overlooked when we are weighing the issues before the start of the sprint. In my case where I was stuck on one issue, if it was originally built as the 9 separate issues I could have been easily divided up amongst the team. At the very least it would have reflected progress being made on the issue board.

Another improvement we can make is our documentation. Although we do a great job relaying information internally, it is important to remember that we are not the only team that will see these issues. Having comments explaining why we did what we did or sources for where we got our information can assist others who look at the issue.

At some point during the sprint I installed at least one package in the wrong directory. There were times this was done because I didn’t know any better, and others by accident because I just forgot to move the working directory. This created many issues and a mess of unnecessary files. Moving forward I need to double check the working directory before installing. Not only this, but having better commits could help revert back to before the installation. Overall this has given me a better appreciation for the power of git commits and its record keeping. 

Meet with Team 1 to discuss frontend testing:

https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/96

Set up linters and lint the GuestInfoFrontend repository:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/95 

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Black-Box vs. Gray-Box vs. White/Clear-Box Testing

TestFort published a blog (https://testfort.com/blog/difference-between-black-box-white-box-and-grey-box-testing#:~:text=While%20black%2Dbox%20testers%20make,in%20a%20non%2Dintrusive%20manner.) that does a great job breaking down each black-box, gray-box, and white/clear-box testing. By understanding each one individually, you can clearly see the differences between them. The blog also provides two other useful pieces of information for each of the software testing methods. Those being the most common design techniques and pros and cons.

Testing is done by an independent team that has no knowledge of the code. The purpose of this testing method is to test the user interface’s functionality and usability. This testing method uses the users point of view to test the expected behaviors of the application.
The first example of black box testing that comes to mind is video-game testing. Testers are often given a demo of a game to play and give feedback on. These testers have no knowledge of the game’s code, however by playing the game they are testing for bugs and evaluating the user interface.

Testing is done by developers that have a great understanding of the application’s internal structure. This testing method’s purpose is to test and analyze that internal structure and its logic using the developers point of view. Developers commonly use tools to help analyze and debug code.
As I am only beginning my journey into developing tests I don’t have much experience with using debugging tools outside of ones provided inside some video games. However, when developing my own code I would commonly add print statements to verify variable values in the middle of the code. This would typically help me catch when values were being assigned incorrectly, scope issues, or simple off-by-one errors.

Testing can be done by developers, testers, and users with a similar testing approach as black box testing. Test cases are designed by an engineer that has decent knowledge of the internal structures. These test cases provide the testers with a glimpse into the software’s architecture without direct access to the source code. This form of testing aims to find defects and vulnerabilities in the structure of the code while combining the advantages of both black and white box testing.
This testing method is the one I have the least experience in, and is therefore the hardest for me to fully understand. My current understanding from this blog is relating it to when I would test software in the military. For obvious reasons, source code was hidden, however the functionality of each feature was documented so that testers could have a clear understanding of what the software was doing.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Finding Mentors

This section really emphasizes the importance a mentor can have on someone’s apprenticeship. Guidance from someone who has already experienced the same or similar issues that you are going through is invaluable. On top of that, it establishes what realistic expectations one should have for a mentor. With computer science being such a vast field that is only getting larger, it’s unrealistic to expect one person to know everything about every topic. The last major point the section covers is that the flow of knowledge does not stop at you. An apprentice must be willing and able to pass on knowledge to other apprentices. 

Thinking back to my most impactful teachers and professors, it’s clear to see that their impact comes from their ability to mentor their students.  Having those impactful mentors throughout my education is what inspired me to seek a career in computer science. The best example I can come up with to relate the impact a mentor can have on an apprentice is this: Imagine trying to solve a hidden picture puzzle or “Where’s Waldo” and you can’t seem to figure it out. Having a mentor is like having a magnifying glass to help narrow down where you should be looking. This sense of direction is great to focus your efforts into researching helpful information. Considering how large the computer science field has grown.

When it comes to choosing a mentor in the computer science field, it is important to realize how large the field is. I have said it three times now, and I still don’t think that is enough to emphasize it. It is best to try and find a mentor that specializes in the field you want to learn about. Although, from my experiences, a mentor that does not specialize in the same field as you is still worth having. A mentor that specializes in any field can still give you tips on how they got to where they are. With the same mentality of teaching a person to fish over giving them a fish, learning how to learn is better than being taught something directly. With information so readily at our fingertips, the ability to research and find solutions is crucial in our world and especially the computer science field.

Bringing everything full circle is the idea that what separates an apprentice from a journeyman is the responsibility to help teach and mentor other apprentices. It makes sense that as I continue down the long path that there will be others behind me. I, personally, have always loved the spark that my mentors have ignited in me and it would be great to be able to pass that sling to others in the future.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Reading List

As the title of this section suggests, it is solely focused on creating a reading list. On the surface, this section has to be the most straightforward in the book, and yet the one I practice/experience the least. With the ever-growing importance of broadening my learning through reading, I wanted to focus on this section as it feels like the obvious place to start.

The idea of creating a reading list seems simple, yet so open-ended that it may also feel impossible. The section focuses on ways you can expand your reading list without feeling so overwhelmed with the endless knowledge that is available. When it comes to learning what books are important and useful enough to add to your list, it makes sense to ask mentors. Other online sources can offer reading lists from other people which may give a good insight of which books should be added to your list. The third way of finding useful sources was to pay attention to which sources are commonly referenced and cited in other readings. Seeing the same book cited multiple times can be a great indicator that it is an important book to add to your list. 

Having a list of which books to read next is a great way to stay organized however, having a reading list will also keep track of what books you have read. One of the points the reading made was that this list is also a reflection of your past reading habits. My list right now would reflect awful reading habits, and I must change that. When I first started to read through the patterns at the start of the semester I saw the entire chapter dedicated to reading and how important it was to broaden my education and craft with the use of reading. Starting a reading list from scratch felt like it was going to be an impossible task, with zero clue where to start or what books would be worth my time. With simple solutions provided by the reading, such as looking for likeminded lists from other people, asking mentors, and paying attention to the cited sources, I now feel way more comfortable with being able to develop my reading list.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Unit Testing

The blog written by Krishna Teja Dinavahi, “Unit Testing – Is it Really Helpful?” (https://engineering.zoominfo.com/unit-testing-is-it-really-helpful) does a great job explaining the importance of writing unit testable code. What is also mentioned is how unit testing and integration testing are two different forms of testing that are both equally important. I specifically enjoyed this blog because of the great examples of code that was not unit testable along with the steps taken to refactor the code. 

As it’s mentioned in the blog, looking up unit testing online will give you the textbook definition, “Unit tests help you test individual parts of your application in isolation.” This is the same thing that was described to me in class, but I had the same general reaction to unit testing as Dinavahi describes. Unit testing can sometimes feel tedious and redundant. However, the real importance of unit testing is clear when you explore code that is not unit testable. Unit testing can not be done on code that is written poorly. This was the biggest eye opener for me as I read this blog, especially with the great examples provided. Notably, the one where having the external dependencies in its own function allows for easy bug fixing if anything was to change in the eternal API.

As I recently began refactoring old code with some of the new techniques and agile methods, I noticed the largest hurdle for me is being able to create “pure functions.” These are functions that are limited to doing one task and are very clear what that task is. From my experiences, having pure functions and good naming conventions are the two most important aspects to readable and scalable code. Approaching the code with unit testing in mind, the should automatically be written in a way that you will create pure functions. 

As someone who strives to write clean, readable code, I feel like I share the motivation Dinavahi expresses in the blog when it comes to learning unit testing. Each time I have refactored my code, I have always felt like it was just not finished. However, using unit testing I will be able to identify which parts of my code are not written properly and need to be refactored again. This time, with the knowledge of the steps I can take to get to unit testable code. 

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Breakable Toys

Breakable toys are small programs you can develop and alter freely, without repercussions if something goes wrong. Often expecting something to go wrong as we learn more from our mistakes and successes. This freedom allows you to experiment and push your limits, creating an opportunity to further develop your knowledge in whatever program or system you are working with.

Reading this pattern has made me realize that almost everything I know about programming has been learned through breakable toys. I have always treated school assignments as breakable toys, with a deadline for no longer being broken. Trying to add features to the project that would force me to learn something new. Through trial and error and not just learning what works and what doesn’t but understanding why they do or don’t. Sometimes, revisiting old projects well past their due date to add features. My go-to breakable toy when learning a new language syntax has always been a decimal-to-binary calculator that can eventually support other bases.

Understanding how big of an impact breakable toys have had on my programming skills, I realize the importance of revisiting them along with making new ones to grow my toolbox. The reading provided a lot of good examples of breakable toys that I can work on and develop in the future. As someone who uses a wiki daily, I have never thought about developing my own until now, and as the reading suggests it would provide a lot of opportunities to develop new features as I go. Other important breakable toys will continue to appear as I learn more

Moving forward I am going to make sure I always have a breakable toy that I am working on and developing. To have many breakable toys at my disposal when it comes to solving problems in projects that do not have the luxury of being breakable. Getting ideas and inspiration for new breakable toys is going to be based on what skills I need to focus on. With those required for my profession at the forefront of the list of breakable toys I need to work on.

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.

Sprint 1 Retrospective

Going into our first sprint, not only as a team together but as each of our first sprints individually, we were all on the same page with similar expectations. Those being that we would equally know just as little as each other. This mentality was good to have when we ran into issues that we knew ahead of time would take working as a team to solve. We had no idea what those issues would be, just that there were going to be plenty as this was a learning opportunity for each one of us.

Our team was tasked with setting up AlexJS linter and Gitpod extensions in select repositories in Thea’s Pantry. We tackled these tasks by dividing the work between us so that we would work primarily in one repository, with mine being the GuestInfoSytems/GuestInfoFrontend. This only worked for 3 of our members with the 4th having to work in a different repository for each issue. Looking back on this, only working in one repository makes working individually more organized but, as we found out later, would lead to less cross referencing and things being missed.

Other issues our team tackled during the sprint involved frontend testing. First we worked together to do research on open source frontend testing software that could be used in our project. This led us to understand how frontend testing works and what tests should be expected. With this knowledge, we investigated the frontends that were available to design the test that would need to be built in a later sprint.

Our team collaboration was by far our strongest feature. With all of us willing to work together and communicate, we were able to make sure that we all stayed on the same page throughout the sprint. Our team stayed in constant communication throughout, even in between meetings. This meant we could communicate times for meetings well ahead of when we wanted to have them, while still being flexible if something came up. When we were working together in a meeting it was either in person or over a discord call. These calls sometimes went on for hours. However, no one let that bother them when it came to getting the work done and sticking around to make sure we all understood what was going on.

The most notable issue we ran into was the weights of our issues. While on paper the issues seemed trivial, what we didn’t account for was the complexities of learning Gitpod and Gitlab. Navigating gitlab and handling pipeline commit message issues lead to the majority of the long nights and ultimately meant that none of our weights should have been a 0.

We were all working on the same or similar issues in different repositories meant we could do them together simultaneously. This led to all of our work this sprint being done during the calls with only minor issues being handled individually. While this made the work way more digestible at the start, it is important that we are able to handle issues individually in the future when we have to work on issues that don’t all align with each other’s. 

I noticed that a lot of, if not all, of my questions were answered in the documentation provided in the repository I was working in. Moving forward I am going to do better at fully looking through the documentation and files to get a better understanding of the project and how to approach issues.

Setup Gitpod environment and settings for GuestInfoFrontend:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/85

Issue to change commands to bin in GuestInfoFrontend was fixed prior to the sprint:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/82 

Worked on adding the AlexJS linter to the pipeline for GuestInfoFrontend:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/81 

Researched open source frontend testing software:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/86

Designed tests for GuestInfoSytems/GuestInfoFrontend:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfofrontend/-/issues/87

Designed tests for InventorySystem/CheckOutGuestFrontend:
https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/inventorysystem/checkoutguestfrontend/-/issues/36 

From the blog CS@Worcester – CS Learning by kbourassa18 and used with permission of the author. All other rights reserved by the author.