Category Archives: CS-443

Black Box Testing

https://www.practitest.com/resource-center/article/black-box-vs-white-box-testing/#:~:text=The%20Black%20Box%20Test%20is,is%20carried%20out%20by%20tester.

Black box testing is a genre of testing which does not take a codes functionality into consideration, in other words the internal workings of the code are not known to the test and the tests are formed strictly by external workings. This is very different from white box testing as white box testing operates under the idea that the ‘tester’ has extensive knowledge of how a system was created along with its inner workings. Some of the differences between black and white box testing are black box testing is carried out by ‘tester’ while white box testing is left to software developers, black box testing is considered behavior testing while white box testing is considered logic testing and black box testing is typically used in system testing while white box testing is used in unit testing. There are also ways in which these two types of testing are similar which is mainly their purpose which is to ensure that a system is working correctly and that you have the best version of the software available.

I chose this article because I liked how it not only explained black box testing but it also compares black box testing to white box testing in order to allow a deeper understanding of the relationship between the two types of testing. I am very interested in seeing how different methods of black box testing work as for the most part we have been practicing with white box testing methods in class so far this semester so the concept of testing without extensive knowledge of a system or without access to the systems internal workings and code seems both interesting and challenging to me. 

With there being a large gap in knowledge of a system between the two different types of testing it seems as though black box testing is something that is done by others not necessarily full blown software developers as developers are expected to spend their time on white box testing so It makes me wonder how exactly these tests are written and how specific results may be measured for success compared to the more straightforward nature of white box testing. Since black box testing can be used for just about every type of testing, even some of the sames types of testing white box is used for it would be nice to see and compare how tests are carried out for both types of testing on a similar component of a system in order to differentiate the information used by each type.

From the blog CS@Worcester – Dylan Brown Computer Science by dylanbrowncs and used with permission of the author. All other rights reserved by the author.

The Logic of Software Testing

Hello everyone,

Although we have been studying software testing for a few weeks, I still want to talk about the “logic” of software testing. Because I think it’s important, to test software comprehensively, we must understand the “logic” of testing. So I want to share a blog with you today:

“What is the Underlying Logic of the Software Testing? ”

by ZenTao 3

Link: https://www.zentao.pm/blog/underlying-logic-of-the-software-testing-1-1249.html

As a student new to software testing, I find the topic of test logic particularly interesting. Recognizing its critical role in ensuring software reliability and functionality, I sought out some resources that could help me develop an understanding of the underlying logic behind the testing process. This blog post does a great job of explaining this to me, providing insight into the complex mechanisms that support effective software testing.

In the first chapter of the article, we learned about the basic requirements for software testing:

  • Software testing is to verify whether the functional characteristics of software meet the requirements;
  • Software testing is to find the defects in the software;
  • Software testing includes static testing – requirement, design, and code review
  • Software testing is to systematically and completely evaluate the quality of software products and provide quality information;
  • Software testing is to expose and reveal product quality risks;
  • Software testing is not only a technical activity but also a comprehensive social and psychological activity;
  • Software testing is to greatly reduce the cost of poor quality by investing in quality assurance costs.

These guidelines will play an important role in our future software testing path. All our testing will be conducted based on these guidelines. Also, article mentioned “based on the understanding of the real needs of users, to obtain the true and comprehensive quality information of software products through various means.” If we become professional software testers in the future, during the testing process, we must Always ask yourself if you are being comprehensive.

What impressed me most was the second chapter in the blog: The Underlying Logic of the Software Testing. And its three questions:

  • Why?
  • What?
  • How?

Why: Because humans are not machines, even machines can make mistakes, so human work will inevitably lead to errors and imperfections due to some reasons (personal habits, time, abilities, etc.).

What: Be clear about the goals, scope, and specific data of the test. Prioritize your testing and do not do tests that are not relevant to your goals.

How: Sometimes obtaining existing test data will help us speed up and improve the efficiency of testing.

Overall, this blog is a great foundation for software testing. During our testing process, we need to ask ourselves whether the above problems have been solved.

From the blog CS@Worcester – Ty-Blog by Tianyuan Wang and used with permission of the author. All other rights reserved by the author.

Code Reviews

Reviewing your code is important, it makes sure that the code is correct and functions the way you want it to. Code review helps cover so many areas of your code. You want to make sure that your code is understandable for anybody else who looks at it and that it’s clear, by reviewing your code you can go back and fix anything that could be making your code more complicated. Code reviewing is important when working with a team, your team should understand what your code is trying to execute without being confused. When it comes to coding so much of your work can change throughout the process which is normal but with so many changes happening it can get confusing. Code reviewing comes with so many different solutions when it comes to writing code it nitpicks what parts are important or not. It’s a helpful tool that helps coders make sure they have clean code and that when working with a team everyone’s comments are heard and changes are made.

Code reviews can be tough if the team isn’t together so questions and comments can’t be answered. Another thing is that the code could be overlapping, and missing a team meeting could affect the code and confuse team members about what they should be writing ending up in similar code. If that happens the next person reviewing the code will find duplicate code and will end up pushing the team’s work behind. Making sure your team communicates will help prevent more code from having to be fixed and reviewed even though you don’t want to add more work on top of what you already have. Code review makes sure your work is good quality and organized. Having sloppy issues and mistakes doesn’t look good for you, your team, and your job. Code review is about making sure your work is organized and clean, you want to make sure you put out good work without having a lot of issues. Especially as a team you want to meet those standards and follow them. Always make sure to review your code because there could be small errors or even confusing comments that will make your code more complicated than it needs to be.

https://blog.pragmaticengineer.com/good-code-reviews-better-code-reviews/

From the blog CS@Worcester – Kaylene Noel's Blog by Kaylene Noel and used with permission of the author. All other rights reserved by the author.

Cultivating Insight: “Reflect As You Work” Week-5

Introspection in Action:

The “Reflect As You Work” pattern, from “Apprenticeship Patterns” by Dave Hoover and Adewale Oshineye, emphasizes the importance of ongoing reflection during your software development journey. This pattern encourages developers to continually assess their experiences, decisions, and outcomes. It’s about developing a habit of introspective thinking that allows you to learn from your actions and continuously improve your skills and approaches.

A Personal Acknowledgment:

While I haven’t yet embarked on a professional software development career, this pattern resonates with me for its universal applicability. Reflective practice is a concept that I find valuable in any learning process. “Reflect As You Work” aligns with my belief in the power of self-awareness and learning from one’s experiences, whether in academic, personal, or future professional settings.

The Power of Self-Reflection:

What stands out to me about this pattern is its focus on the transformative power of reflection. By regularly taking stock of what works and what doesn’t, and why certain approaches succeed or fail, one can gain deeper insights into their work and personal growth. This practice turns every task and challenge into a learning opportunity.

Shaping a Reflective Mindset:

Though I am yet to apply this in a professional context, “Reflect As You Work” shapes how I view future work and learning. It instills the idea that real growth stems from not just doing but understanding and analyzing the process and outcomes of one’s actions. This continuous cycle of action and reflection is what drives deeper learning and skill development.

Embracing Reflection, Balancing Action:

I wholeheartedly embrace this pattern’s message, but I also recognize the need for a balance between reflection and action. Constant reflection should not impede progress or lead to over-analysis. The challenge lies in integrating reflection effectively into the workflow without it becoming an obstacle to productivity.

In conclusion, “Reflect As You Work” is a pivotal pattern for anyone who seeks not just to work in the field of software development but to excel in it. It encourages a mindset where every experience is a source of learning and every challenge is a stepping stone to improvement. This pattern is a reminder that the journey to becoming a skilled software developer is as much about introspection and learning from one’s own journey as it is about acquiring new technical skills.

From the blog CS@Worcester – Kadriu's Blog by Arber Kadriu and used with permission of the author. All other rights reserved by the author.

Code Review

For this week’s blog post, I chose the article “Code Review Best Practices – Lessons from the Trenches” by Drazen Zaric. I chose this article because its topic fits perfectly with the cove review segment in the syllabus. This article discusses why you should do code reviews, how code reviews act as quality assurance, how code reviews function as a team improvement tool, how to prepare a pull request for preview, and, of course, how to review code. In this article, I will be discussing why you should do code reviews and how they work as quality assurance.

Reviewing code is one of the most essential parts of the development process. “It should be obvious that the primary purpose of code review is to assess the quality of the changes being introduced. I mean, the dictionary definition of review says precisely that ‘review (noun) – a formal assessment of something with the intention of instituting change if necessary.’ Of course, code being code, there’s a lot of things that can be checked and tested automatically, so there’s nuance to what needs to be checked in an actual code review.” As mentioned in the article, there are many things that can be tested and should be tested. This leads to a need for many people to review your code, and you will need to review many other people’s code to make sure the best possible software is being developed. Quality assurance must be done well as a significant part of making sure your software is the best it can be.

In this section of the blog post, I will discuss how the article mentions how code review is incredibly useful in quality assurance. “There are many ways in which code reviews help maintain the quality bar for the codebase and the product. In the end, it comes down to catching mistakes at a level that can hardly be automatically tested, such as architectural inconsistencies. Also, the code for automated tests should be reviewed, so there’s a meta-level at which reviews help with QA.” As mentioned, code review’s main boon to quality assurance is finding issues that can’t, or often need to be caught, through traditional testing methods, like automated testing. The article also mentions using checklists for storing what needs to be checked and how and what the results of said checks should be. “You can have your own checklist or make it a shared list for the team or a project. There’s a ton of material written on the usefulness of checklists. In Getting Things Done, David Allen puts forward a simple idea – our minds are great at processing information but terrible at storing and recalling it. That’s why checklists are a great way of externally storing and breaking down a planned or repetitive task.” Having a method of keeping track of what is done, what needs to be done, and what is incomplete is essential in working on any large project, let alone on a software development project.

From the blog CS@Worcester – P. McManus Worcester State CS Blog by patrickmcmanus1 and used with permission of the author. All other rights reserved by the author.

Static Testing VS Dynamic Testing

The blog post highlights the qualities as well as the differences between these two types of testing, static testing and dynamic testing. I chose this blog post because as this course covers software quality assurance and testing as well as the fact that we have spent time in class covering these two types of testing I believe that this blog post is able to highlight and reinforce core concepts that will be able to assist in gaining further knowledge withing this class. In addition, the blog post is able to explain the information regarding static and dynamic testing in a simple and easy to understand format that further compliments the idea of using this blog post as a resource to reinforce these topics.

The blog post as previously discussed covers static testing vs dynamic testing. We learn that static testing involves testing the code without actually running it while dynamic testing involves running the code to test it’s outcomes through various testing circumstances. From those two descriptions we can tell how static testing relies on testing through software documentation as well as the design of the code itself. However, dynamic testing is able to execute the program allowing the testers to test how the code will work in an assortment of testing scenarios. This concept allows testers to see how the code will work once it is released to the public to verify that it works as intended. These two types of testing are very different in their methods of achieving a successful test. Static testings wants to identify problems and improve on them early in development while dynamic testing wants to validate the performance and functionality of the code once it is in a executable state. Since they have different intents your requirements for the project is what determines what testing you will choose.

From what I have learned from the blog post I believe it was very helpful and was able to reinforce core concepts that will help me further in this class. I believe learning more about static and dynamic testing will help me when it comes to working in this class as well as assist in knowing how to test in a professional setting. Knowing the core differences between the two will allow me to know what type of testing will be best for certain circumstances when it comes to projects. In conclusion, this blog post was very helpful and will be utilized in the future.

https://testsigma.com/blog/static-testing-and-dynamic-testing

From the blog CS@Worcester – Giovanni Casiano – Software Development by Giovanni Casiano and used with permission of the author. All other rights reserved by the author.

Equivalence Class Testing

A Critical Component of Software Quality Assurance

Equivalence Class Testing stands out as a highly efficient and systematic approach. This blog post delves into the concept of Equivalence Class Testing, its significance in SQA, and how it fits into the broader context of software testing.

Understanding Equivalence Class Testing

Equivalence Class Testing is a black box testing method used to divide the input data of a software application into partitions of equivalent data from which test cases can be derived. An equivalence class represents a set of valid or invalid states for input conditions.

The main advantage of Equivalence Class Testing is its efficiency. Instead of testing every possible input individually, which can be impractical or impossible for systems with a vast range of inputs, testers can cover more ground by focusing on one representative per equivalence class.

Identifying Equivalence Classes

Equivalence classes are typically divided into two types: valid and invalid. Valid equivalence classes correspond to a set of inputs that are expected to be accepted by the software system, leading to a correct output. The process of identifying these classes involves analyzing the software specifications and requirements to understand the input data’s boundaries and constraints.

The Role of Equivalence Class Testing in SQA

Software Quality Assurance encompasses a wide array of activities designed to ensure that the developed software meets and maintains the required standards and procedures throughout its lifecycle. Equivalence Class Testing fits into the SQA framework as a key component of the testing phase, contributing to the overall goal of identifying and mitigating defects.

By integrating Equivalence Class Testing into the SQA process, organizations can achieve several objectives:

  1. Enhanced Test Coverage: Equivalence Class Testing allows teams to systematically cover a wide range of input scenarios, thereby increasing the likelihood of uncovering hidden bugs.
  2. Efficiency and Cost-Effectiveness: By reducing the number of test cases without sacrificing the breadth of input conditions tested, teams can optimize their resources and save significant time and costs.
  3. Improved Software Quality: By ensuring that different categories of input are adequately tested, teams can enhance the robustness and reliability of the software product.

Implementing Equivalence Class Testing

To effectively implement Equivalence Class Testing, teams should follow a structured approach:

  1. Review Requirements and Specifications: Begin by thoroughly analyzing the software requirements and design documents to identify all possible input conditions.
  2. Identify and Define Equivalence Classes: Classify these input conditions into valid and invalid equivalence classes.
  3. Design and Execute Test Cases: Develop test cases based on representative values from each equivalence class and execute them to verify the behavior of the application.
  4. Evaluate and Document Results: Record the outcomes of the test cases and analyze them to identify any deviations from the expected results.

 

I was based to this blog: https://www.celestialsys.com/blogs/software-testing-boundary-value-analysis-equivalence-partitioning

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

Equivalence Class Testing

Among various testing techniques, equivalence class testing stands out as an efficient method for cutting down the number of test cases required while maintaining thorough test coverage. 

Equivalence class testing is based on the principle that inputs can be grouped into equivalence classes that exhibit similar behavior. By selecting representative test cases from these classes, testers can efficiently cover various scenarios without testing every possible input value individually. This technique is the best of both worlds, optimizing test case selection all while maintaining thorough test coverage; as those from ProfessionalQA.com put it, both the quality of test cases as well as testing as a whole is enhanced “by removing the vast amount of redundancy and gaps that appear in the boundary value testing.”

Equivalence class testing has four variations, each of which have their own benefits, downsides, and uses. They are determined using the combinations of two factors, the number of test cases and whether only valid values are tested or both valid and invalid are tested Thus, in terms of equivalence classes, we have weak-normal, strong-normal, weak-robust, and strong-robust. Weak-normal has few but effective tests and only covers the valid equivalence classes, strong-normal covers every valid equivalence class, weak-robust is like weak-normal but includes an invalid equivalence class(es) as well, and strong-robust covers every valid and invalid equivalence class. One thing to note about strong-robust equivalence class testing is that there is some redundancy when it comes to testing the invalid equivalence classes.

Equivalence class testing was a bit hard to pick up initially but it really clicked thanks to some visual aid, that being the graphs of the variations of equivalence class testing. With this visual, I was able to understand how effective equivalence class testing is and why some will want to use it. It allows testers to “focus on smaller data sets, which increases the probability to uncovering more defects in the software product” and may reduce the possibility of error on the tester’s part. With other testing techniques that are more difficult or time-consuming when it comes to larger data sets, equivalence class testing is a great alternative.

https://www.professionalqa.com/equivalence-class-testing

From the blog CS@Worcester – Kyler's Blog by kylerlai and used with permission of the author. All other rights reserved by the author.

Interesting Features of JUnit 5

Since beginning to work with code in CS443 – Software Quality Assurance and Testing, we’ve used JUnit framework for designing and running our test cases. So I decided to search for a blog post discussing some interesting features that I may not have come across yet, but could be useful and landed upon Exploring the Exciting New Features of JUnit 5. This post is from December 2023, so it should be relatively up-to-date and I recall a conversation with Dr. Wurst at one point where he briefly mentioned considering switching to a newer version of JUnit for some attractive features – hopefully we can delve into some of these.

Several feature additions come with JUnit 5 and specifically version 5.4. One that immediately stood out to me was support for more/new annotations and assertions like @Nested. We’ve looked at some basic annotations like @BeforeEach and @AfterAll in class but the idea of nesting tests is newer – however it makes perfect sense from a practical perspective. Depending on the outcome of an initial test, testers may want to run further tests on one branch or two different tests depending on which branch is followed. Proper annotating likely helps the compiler recognize the nested nature of the tests preceded and manage potentially complex webs of nested tests most efficiently.

There’s also improvements to the assertEquals() functions and overall flexibility through enhancements to API and insertion features for handling Lambda functions. This goes hand in hand with a new feature of JUnit 5 – the ability for tests to be dynamically generated during test runtime and implemented (if needed) using a Factory class/method. Last semester in Software Construction Design and Architecture, we learned about the Factory architecture and methodology so it was cool to see it applied to enhance features in professional software. 

Another cool feature of JUnit 5 which represents a considerable change from JUnit 4 is the transition to a modular structure, meaning there is a separate test runner and classes which operate independently from the main program. I could imagine that this separation isolates any issues that may arise during testing and protect the main program, while also preventing any unintended interactions with the main from interacting with properly designed tests.

JUnit 5 offers some major features and enhancements over the previous versions with the ability to tag and implement nested tests, improved Lambda function support and Factory method for dynamic test creation and implementation. Considering these, I can see how JUnit could be effective for designing automated test runs. I’m looking forward to implementing more of these features in our class and homework activities for CS443, and trying some extra tests and methods that I read about in this.

Source: 

https://blog.machinet.net/post/exploring-the-exciting-new-features-of-j-unit-5

From the blog CS@Worcester – Tech. Worth Talking About by jelbirt and used with permission of the author. All other rights reserved by the author.

Pairwise and Combinatorial Testing

The article “Combinatorial Testing” focuses on the insights of software testing methods. This article explores the evolution of combinatorial testing, talking about advancements in algorithm performance and constraint representation. The article also talks about the importance in detecting interaction failures within software systems. The article also demonstrates the effectiveness of t-way combinations fault detection across various domains. The article “Pairwise Testing” talks about pair testing as a permutation and combination technique aimed at testing each pair of input parameters to ensure that the system if functioning properly across all possible combinations. The article also addresses the many benefits of pairwise testing and it’s role in reducing test execution time and cost while maintaining test coverage. Also, it talks about the challenges associated with pairwise testing, including the limitations in detecting interactions beyond pairwise combinations.

Pairwise Testing

pairwise testing is a software testing method that aims to comprehensively validate the behavior of a system by testing all possible pairs of input parameters. This method is mainly used when many of the defects in software systems are triggered by interactions between pairs of input parameters, rather than by individual parameters in isolation.

Benefits & Challenges

some benefits that pairwise offers is, efficiency: by testing the combinations of two input parameters at a time. This reduce’s the number of test cases required compared to exhaustive testing. pairwise testing also offers effective defect detection: by effectively finding defects that are triggered by interactions between pairs of input parameters, pairwise testing also helps to identify certain scenarios by systematically exploring pairs of parameters. Some challenges that pairwise testing may face is when it comes to parameter selection. Selecting the right parameters is crucial and requires a lot of knowledge of the software and it’s potential interaction scenarios. If the wrong parameter is selected this can lead to incomplete test coverage and missed defects.

Combinatorial Testing

Combinatorial testing is a software testing technique that focuses on efficiently testing the interactions between different input parameters of a system. This test method involves generating a set of test cases that include various combinations of input values / specific parameter values.

Benefits & Challenges

Some benefits of combinational testing include improved software quality: by being able to identify and address the interaction failures early in the development process. This test method tests various combinations of input parameters, which can help find defects that could impact the systems performance. A challenge that combinational testing may face is the scalability. Combinatorial testing is effective for small to medium sized systems and when scaling it to large and complex systems with a high number of input parameters and values, you may run into some problems.

Why did I pick this Article?

I pick these two article that talk about pairwise and combinatorial testing because both these test methods stand at the forefront of software test methods. The article’s goes into details about how both of these test methods offer an efficient way to ensure comprehensive test coverage while minimizing redundancy. Both of these articles have taught me a lot about pairwise and combinational testing.

Reflection

After reading both of these articles, I have gained a greater understanding of both these test cases. With the new found knowledge, I aspire to apply pairwise and combinatorial testing techniques in my future projects. Both these test methods offer practical solutions to common testing challenges, and by incorporating them into my future endeavors I aim to contribute to the development of reliable software systems.

Article link is here: https://www.sciencedirect.com/science/article/abs/pii/S0065245815000352

https://testsigma.com/blog/pairwise-testing/

From the blog CS@Worcester – In's and Out's of Software Testing by Jaylon Brodie and used with permission of the author. All other rights reserved by the author.