Category Archives: CS-443

How Test-Driven Development Changed My View on Coding

The article I selected is titled What is Test-Driven Development? It explores TDD, which stands for Test-Driven Development. A software development methodology where tests are written before writing the actual code. At first, this idea sounded very backward to me, especially as a student still learning how to code. Originally introduced by Kent Beck in the 1990s, TDD follows a specific cycle: first, you write a failing test for a small piece of functionality. Next, you write the minimal amount of code needed to make that test pass. Finally, you refactor the code while continuing to pass all the tests. This method aims to create reliable and well-structured code from the very beginning.

I chose this article because while working on the TDD assignment for class, I found myself very confused about why the process was designed this way. It felt unnatural to write tests before even having code to test. After reading a few articles, including this one, I learned that the main purpose of TDD is to reduce the amount of time spent debugging and to automate testing early. It helps ensure that the code behaves correctly as new features are added, reducing bugs and saving time later.

After practicing more during the assignment, I began to see the benefits firsthand. I enjoyed the process once I understood it better, even though there were moments when I had to refactor my code multiple times to make all the tests pass. One important takeaway from the article was how TDD encourages continuous improvement. As developers write more tests, their code quality naturally improves over time. I also learned that TDD plays an important role in Agile workflows, pushing developers to prioritize testing before writing large chunks of code. This mindset shift promotes creativity, collaboration between developers and QA testers, and reduces technical debt, making it easier to maintain and update code in the future.

This article and topic really changed how I view software development. It showed me that TDD can be both a creative and collaborative process rather than just a strict set of rules. I now plan to apply TDD practices in my future career. By writing tests first, I can better organize my development process, catch issues early, and build more reliable software. Exploring this topic helped me overcome my confusion during class and appreciate why Kent Beck created this approach in the first place.

Reference:
Moore, Paul. “What Is Test-Driven Development?” Scrumalliance.org, 2023, resources.scrumalliance.org/Article/test-driven-development.

From the blog CS@Worcester – CodedBear by donna abayon and used with permission of the author. All other rights reserved by the author.

Learning JUnit 

In the article I selected, the topic of JUnit, a popular Java testing framework, is introduced and explained. The article simplifies JUnit for beginners or those who have never used it before. It discusses key features such as assertions, test runners, test suites, and reporting tools. The article is divided into several sections, including an overview of what JUnit is, how it functions, the different types of testing it supports, and the key benefits of using it. It also provides a step-by-step guide on how to download and set up JUnit, making it an accessible resource for new learners.

Before taking this class, I barely knew anything about JUnit. As I read through the article, I learned that JUnit is part of the xUnit family of testing frameworks and is primarily used for automating unit tests in Java applications. It can also support other types of testing, such as functional and integration tests. One of the biggest takeaways for me was understanding the features that make JUnit so effective: assertions for verifying test results, test runners for executing tests, test suites for grouping tests together, and reporting tools for easily spotting problems. I also learned why using JUnit is important not only because it helps developers write more organized and readable code, but it also improves error detection and correction early in the development process. This ultimately boosts the efficiency of QA testers and software engineers.

I chose this article because we recently discussed JUnit in class, and I wanted to deepen my understanding beyond just what was covered in lectures. As someone studying to become a future software engineer, I realized that knowing how to write effective tests is just as important as writing code itself. Testing frameworks like JUnit ensure that applications behave as expected, making them more reliable and easier to maintain over time.

Reflecting on what I learned, I feel much more confident about incorporating unit testing into my future projects. Learning about assertions and test runners especially helped me see how testing can be integrated smoothly into the development process rather than being something added at the end. Going forward, I plan to apply this knowledge by writing unit tests alongside my code from the beginning, which I believe will make me a more efficient and thoughtful developer. Overall, this article not only expanded my technical skills but also shifted my mindset about the importance of testing in building quality software.

Reference:
Abhaya. “JUnit: A Complete Guide – Abhaya – Medium.” Medium, 9 Jan. 2024, medium.com/@abhaykhs/junit-a-complete-guide-83470e717dce.

From the blog CS@Worcester – CodedBear by donna abayon and used with permission of the author. All other rights reserved by the author.

Test Driven Development

This past week we worked on test drive development which was very difficult for me do to me being used to working with only source code first then writing test code. This new approach in my head was fairly easy, but when I went to code it, I was struggling. I believe part of this struggle was due to me not thoroughly writing out my test cases and taking the time to fully understand what I was doing. I ended up doing better on the testing for the homework than the activity I believe because I took a step back to understand and read more in depth into the five steps provided. I decided to also read more on another website (sourced down below) about test driven development, which this website went into more of the process of it and how the cycle works. It explored the history of it as well as the advantages and disadvantages.

These advantages included how writing the tests first provided constant feedback to the developer as well as always meeting the requirements more in depth and not having unnecessary tests or codes. This helps developers decrease production time in some scenarios due to only having to write the tests than source code to only specially pass that one test and if needed down the road to refractor code the developer can do so as well, but they will know what went wrong and reach their conclusions much quicker. The disadvantages spoken about are increased code volume which can be a pain currently or down the line when the code is going to be refactored or maintenance. Also, a huge disadvantage that can lead to multiple issues is false security from tests which some developers will go in and assume since one test passed, they do not need to make more. I believe personally for larger applications test driven development is not the best idea due to ever growing projects which will require lots of testing and can only be written after the source code to ensure they all work together rather than individually because some methods rely heavily on other methods.

The great thing about test driven development though that I learned and enjoy is finding bugs much earlier on. It helps me quickly go back and refractor my code for the test to pass but as stated previously it has its advantages and disadvantages. Overall, I had a hard time with it because I have never heard of it until now, but reading more about it I understand the main concepts of it. The activities in class did help discussing with the team as well as the homework, but the thing that confused me about the homework was the log since I usually don’t write logs on how and what test I am going to do because I base it on the source code. Overall, it was a great experience, and I am glad I was exposed to it so I can try it more on my free time and see how it is used in the real world.

Source: What is Test Driven Development (TDD)? | GeeksforGeeks

From the blog Cinnamon Codes by CinCodes and used with permission of the author. All other rights reserved by the author.

Favor real dependencies for unit testing

URL: https://stackoverflow.blog/2022/01/03/favor-real-dependencies-for-unit-testing/

Mark Seeman brings us an interesting idea about which dependencies should be used during testing. In his article Favor real dependencies for unit testing, he explains that not every dependency necessarily helps you develop your tests. His main point concerns the use of dependencies that generate some kind of fake implementation of your methods in order to allow you to test them. One great example of this is Mockito, a widely used Java library where you can ask the tool to mock an entire class implementation. Although that sounds completely reasonable at first glance, what could be one issue that Mark is possibly missing in his argument? I would say that he is missing the reason why developers often rely on mocks and stubs in real-world development scenarios.

The main reason someone may choose to use mocks and stubs is more related to collaborative group work rather than projects handled by a single developer. In group settings, such as when working on a complex system like a hotel booking website, developers are usually assigned to different components or features of the system. For example, imagine a situation where you are working as a developer on such a project and are responsible for the Bookings class, while your teammate is assigned to the Suites class. Both of you have been making progress on your respective parts, and now you want to start writing tests to ensure everything functions as expected.

However, if any of your methods rely on a function that your teammate has not yet implemented, you could run into difficulties. Without the other function available, you might not be able to fully test your own code, even though your part is technically complete. This could lead to a development bottleneck, preventing you from moving forward until the rest of the system is ready.

To solve such a problem, one practical solution is to use libraries like Mockito. These tools allow you to create a mock version of your teammate’s class or method, enabling you to continue writing and running tests without delay. As explained earlier, Mockito generates fake implementations that simulate the behavior of the real components. This makes it possible to isolate and verify your own code independently.

Mark’s point is valid in scenarios where a developer is solely responsible for both the implementation and testing of all related methods. In such cases, using real dependencies like database fakes or stubs may be more effective. However, in collaborative environments, mocking libraries are essential tools that support parallel development.

This article surprised me with its perspective and application. As I’ve learned in class, the use of mocks allows developers to test features that haven’t been implemented yet adding a useful layer of abstraction. I believe that such libraries are not meant to stay in the codebase permanently but rather serve as temporary scaffolding—tools meant to be discarded once the full system is in place.

From the blog CS@Worcester – CS Today by Guilherme Salazar Almeida Nazareth and used with permission of the author. All other rights reserved by the author.

Path Testing

Hello! Welcome back to my next blog post. This post is about path testing. I used this article to do some research on it: Basis Path Testing in Software Testing | GeeksforGeeks

In class, we learnt about this in depth in one of our POGIL activities. This type of testing has to do with actual code, and creating charts to further analyze and organize each step of the testing. Program graphs are graphs created with circles and arrows pointing to other circles to showcase the flow of the code. For example, loops will have arrows that point back to previous circles, until the entire loop is completed. Branches can be shown by splitting one circle into two other circles with two arrows; one pointing to each one.

In the article, they called it a “Control Flow Graph.” The article called a node with two or more arrows exiting it a decision node. They also called nodes where there are two or more input arrows junction nodes. This article went even more in depth than we did in class, because it talked about regions as well, which are basically just certain areas of the graph.

This article was very interesting, and it was made easy to understand because there were several pictures indicating each type of code and how it would look like in one of the graphs. They showed examples for do while loops, if statements, and many more aspects of code. This is the reason why I picked this article; since it expanded on what we already learnt about in our class.

Some more information that we learnt about in class beyond just the graphs was about DD-Paths, where the previous graphs I just mentioned are condensed into smaller, easier to understand graphs that are organized based on each type of node. Similar nodes are condensed into one node, but the first and last node are separated.

Overall, I think this was an interesting topic to both learn about in class, and also learn more about with the article I looked into. This is definitely an important part of testing, since it helps organize everything. Sometimes, reading code is not very easy or organized and this method helps with both of those problems.

From the blog cs@worcester – Akshay's Blog by Akshay Ganesh and used with permission of the author. All other rights reserved by the author.

Week 12: ​Understanding the Importance of Software Testing: A Comprehensive Guide

In the dynamic world of software development, ensuring the reliability and functionality of applications is paramount. Software testing emerges as a critical process that verifies whether a software product meets its intended requirements and functions seamlessly under various conditions. It’s not merely about identifying bugs; it’s about validating that the software delivers a quality experience to its users.

Types of Software Testing

Software testing encompasses various methodologies, each targeting specific aspects of the application:​

  1. Functional Testing: Validates that each function of the software operates in conformance with the requirement specifications.​Full Scale
  2. Non-functional Testing: Assesses non-functional aspects like performance, usability, and reliability.​Full Scale+1Full Scale+1
  3. Regression Testing: Ensures that new code changes do not adversely affect the existing functionalities of the product.​
  4. Black Box Testing: Examines the functionality of an application without peering into its internal structures or workings.​
  5. White Box Testing: Involves testing internal structures or workings of an application, as opposed to its functionality.​
  6. Automated Testing: Utilizes specialized tools to execute tests automatically, increasing efficiency and coverage.​
  7. Manual Testing: Involves human testers executing test cases without the use of automation tools.​

Levels of Software Testing

Testing is conducted at various stages of the software development lifecycle:​

  1. Unit Testing: Focuses on individual components or pieces of code for a system.​
  2. Integration Testing: Examines the interactions between integrated units/modules.​
  3. System Testing: Tests the complete and integrated software to evaluate the system’s compliance with its specified requirements.​Full Scale+1Full
  4. Acceptance Testing: Determines whether the system satisfies the business requirements and is ready for deployment.​

The Role of Software Testers

Software testers play a pivotal role in the development process. They are responsible for designing test cases, executing tests, and identifying bugs before the software reaches the end-user. Their work ensures that the final product is reliable, efficient, and user-friendly.


Conclusion

Software testing is an indispensable part of the software development process. It ensures that the final product is of high quality, meets user expectations, and functions as intended. By understanding and implementing effective testing strategies, organizations can deliver robust and reliable software products.

From the blog CS@Worcester – Nguyen Technique by Nguyen Vuong and used with permission of the author. All other rights reserved by the author.

Test-Driven Development

Hello everyone,

This week’s blog topic would be about Test-Driven Development (TTD) as this is something we recently talked about in class and it didn’t take long for me to understand the importance of it. So Test-Driven Development (TTD) is a software development process that involves writing tests for your code before you write the code. At first this was very confusing but after trying and actually working on it, I actually saw its purpose.  This approach has transformed the development of coding projects and has revolved around testing. While the more traditional way is concentrated around the waterfall model, which is a more linear approach where testing occurs near the end of a one long timeline. TDD makes testing an ongoing process, a reiterative process. It follows simple steps which cycle through the process. You first write the desired test for the desired feature, ensuring the test fails because the feature has not been written first and then you write enough code where it passes the test. This cycle repeats with further improvements and new features until the project is complete. Its core principle is rooted in Agile development, where it emphasizes iterative development with collaborative efforts based on customer feedback and the ability to change. The benefits of TTD is that it enhances collaboration through shared understanding of requirements, it is one of the best ways to detect bugs early on the development cycle of the project and it improves code design immensely. Because it is driven from testing it allows the code to evolve organically, it creates a program having the same format of coding throughout it without even trying too much. Due to its core principles, it also lowers the long term maintenance costs and this can be hugely beneficial for big projects that have a long lifespan. Not only does this blog explain what TTD is, the author also shares its best advice and practices for the developers who are trying to implement it in their work. You first start simple by writing a focused test on the fundamentals features of the project. Then you create more complex tests for specific situations. What I liked about this post and the reason why I chose it was that it has a good balance of theoretical concepts and also actual practical use. I appreciated how the author walked us over through the concepts and then immediately followed up with simple examples. This reinforces what you are trying to learn and through practice you test the concepts that you just learnt.

In conclusion, Test-Driven Development represents a new way in software development, where it highlights and prioritizes the importance of testing and the quality that it brings and you revolve it around it. By integrating testing into every step of development, TTD creates a strong and maintainable software program while supporting modern development practices. The development may be slow at first, but the long term benefits and the high quality in code make up for it.

Source: https://circleci.com/blog/test-driven-development-tdd/

From the blog Elio's Blog by Elio Ngjelo and used with permission of the author. All other rights reserved by the author.

CS443: Cultivating a Culture of DevOps

A snap of the Microsoft Azure learning portal.

Today’s article, “Recommendations for fostering DevOps culture”, comes from the Azure Well-Architected Framework. You can find it here.

Following up on my previous two articles on the failure of Spotify model and an exercise to attempt to salvage some part of said model, I decided to read an article from Microsoft on how to best implement DevOps. Their suggestion? Start with the team culture.

What is it about?

This article lays a whole bunch of best-practices for creating a successful, productive, and well-managed team structure, in accordance with Azure’s Well-Architected Framework.

What did I learn?

That more than anything else, culture is what separates a computer hobbyist from a professional engineer. It’s not enough to simply be individually passionate; you have to be part of a team structure that allows your passion to directly contribute to the success of the team, and for you to be similarly inspired by your own teammates’ contributions.

What was most surprising to me?

That these are “common sense” principles. I think a lot of people, especially in the corporate world, have a particularly hierarchical idea of team structure. I’m sure we’ve all had one boss who’s been far too interested in holding pulse checks, team meetings, and debriefs than they were in actually letting their employees do their work.

Even so, the fact that many of the WAF’s principles not only make sense but make good sense seems to be a credit to how well-thought out they are. Rather than forcing the issue of collaborations through meetings, for example, it says to allow for collaboration to occur in small spaces between workers, so that the process of ideating comes naturally at its own pace.

What are my take-aways?

  • Encourage interrelatedness as opposed to interdependence.
  • Use effective team charting software, i.e. Jira. (See last week’s article.)
  • Embrace continuous improvement, continuous integration, and continuous development wholeheartedly.

Kevin N.

From the blog CS-443 – Kevin D. Nguyen by Kevin Nguyen and used with permission of the author. All other rights reserved by the author.

Learning the Ropes: A Student’s Dive into QA Testing Best Practices

I recently came across the article “Best Practices for Software Quality Assurance Testing” by KMS Technology. As a computer science student eager to understand the practical aspects of software development, this piece offered a clear roadmap of the QA process, breaking it down into four main stages: planning, test design, execution, and reporting.

1. Planning: The article emphasizes the importance of early-stage planning, including resource allocation, timeline estimation, and tool selection. This stage sets the foundation for the entire QA process.​

2. Test Design: Here, the focus is on defining both functional and non-functional requirements. The article suggests determining which tests can be automated and which require manual intervention, ensuring comprehensive coverage of user scenarios.​KMS Technology

3. Test Execution: This phase involves running the designed tests and evaluating any defects or issues that arise. It’s a repetitive process, ensuring that each identified problem is addressed and retested.​

4. Reporting and Maintenance: The final stage is about documenting findings, analyzing results, and ensuring that the software is ready for release. Continuous feedback loops between testers and developers are crucial here.​

Reflecting on these stages, I realize how often, in academic projects, we might overlook structured testing due to time constraints or lack of emphasis. However, this article highlights that integrating testing throughout the development cycle, rather than treating it as a final step, leads to more reliable and efficient software.

One key takeaway for me is the significance of clear communication and documentation. In group projects, miscommunication can lead to redundant work or overlooked bugs. By adopting a structured QA approach, we can mitigate these issues.

In conclusion, this article has provided me with a practical framework for approaching software testing. As I continue my studies and work on more complex projects, I plan to implement these best practices to enhance the quality and reliability of my work.

For those interested in a deeper dive, here’s the full article: Best Practices for Software Quality Assurance Testing.

From the blog Zacharys Computer Science Blog by Zachary Kimball and used with permission of the author. All other rights reserved by the author.

Comparing Enterprise Testing to Consumer Testing

Photo by SevenStorm JUHASZIMRUS on Pexels.com

Hello, Debug Ducker here. Last post I made was discussing the developer prioritization of quality for an enterprise product compared to a consumer product. The topic got me thinking what other things does a developer need to be concern with when it comes to Enterprise software and consumer software. What ideas or planning needed when it comes to the two.

First the differences are clear when it comes to developing and testing these types of software. For Consumer products you are developing for a large majority and prioritize the experience for an individual user. Enterprises are for mostly organization use, like a company. When making either one needs to think what is the needs for the software. Take consumer products such as photo editing, video editing, spreadsheets, etc. Enterprises product are specific to the organization that may need it to fill a specific purpose. That doesn’t mean that software that can help a business is always an enterprise software, some software is not just useful for the individual but for business like spreadsheets programs.

When it comes to developing the two products different mindsets and thoughts are needed. For consumer, you need to get into the consumers head and think what they may look for in the product. Probably not anything to specific to say but they may look for other things such as price and needs. Enterprises are different in the fact that they wouldn’t mind paying more and would want a degree of quality. I found that enterprise products tend to have more care put into them compare to consumer products but that is probably because a business wouldn’t want to upset a partner. Enterprise may want specifics that they hope the developers may be able to fill and it because of that is why software developers would work closely with business. Think of it as a bonus when it comes to working with Enterprise as it may demand more out of the developer but the advantage is if work closely, you may be able to get stuff done meeting their demands.

Testing for Enterprise software is a lot more complex to. I found some details online that list specific types to look out for.

  • Functionality Testing
    • Testing to see if it passes functionality requirements
  • Usability Testing
    • Test for optimal user experience
  • Security Testing
    • Testing for vulnerabilities
  • Performance Testing
    • Test to see how well it performance
  • Integration Testing
    • test to see if different modules and applications and external system work with it
  • Compliance and Regulatory Testing
    • Test to see if it passes legal and specific industry requirements

These are all the types of testing to look out for, when it comes to enterprises. Not to say the same can’t be done for consumers, though it is a lot more important when it comes to enterprise.

Thank you for your time, have a nice day.

The Ultimate Guide to Enterprise Software Testing – Testlio, 3 Jan. 2025, testlio.com/blog/enterprise-software-testing/.

Nasnodkar, Sid. “Enterprise vs Consumer Product Management.” Product School, 9 Jan. 2023, productschool.com/blog/product-fundamentals/enterprise-vs-consumer-product-management.

Shields, Keith. “Enterprise Software Development vs. Regular Software Development.” Custom Software Development and Mobile App Design, Designli LLC, 1 Mar. 2025, designli.co/blog/enterprise-software-development-process.

From the blog Debug Duck by debugducker and used with permission of the author. All other rights reserved by the author.