Category Archives: CS-443

Unit Testing With JUnit

During these first few weeks of class, we have been talking about JUnit and how it has features that allow us to test our code. We mainly talked about annotating methods to use as test cases as well as different assertions from Java and third-party libraries in order to help determine if a test was successful. While we kept using it throughout the week in order to help us test our code, I wasn’t exactly sure what JUnit actually was. Luckily when I was doing some research on it, I came across a blog on Parasoft by Nathan Jakubiak which gave a lot of useful information on what unit testing is, what JUnit is, as well as how to set up JUnit testing and to write different tests. I think that Jakubiak gave great descriptions as to what each of them are and what they are used for. Firstly, he stated “Unit testing is a form of white box testing in which test cases are based on internal structure. The tester chooses inputs to exercise particular paths through the code and configures assertions that validate the output. The purpose of unit testing is to examine the individual components or pieces of methods/classes to verify functionality, ensuring the behavior is as expected.” This means that unit testing is a type of testing where test cases are created based on certain parts of the program that you want to test, rather than testing the entire code in one test. For JUnit testing, Jakubiak stated “JUnit is the most popular Java unit testing framework. An open-source framework, it’s used to write and run repeatable automated tests.” Essentially he is just letting us know that it is an open-sourced framework that allows us to run different tests for our code. In his blog he also talks about how to set up JUnit testing which I personally don’t understand, probably because I just started working with it. However later in his blog he talks about all of the different parts of a JUnit test and how to write them. He also gave examples for some of the different parts, such as annotations, which I found to be really helpful in my understanding of the subject. I chose this Jakubiak’s blog because in all of the research I did on the topics of JUnit and Unit Testing, his blog did the best job of explaining them and overall gave me a much better understanding of the topics.

Link: https://www.parasoft.com/blog/junit-tutorial-setting-up-writing-and-running-java-unit-tests/

From the blog CS@Worcester – One pixel at a time by gizmo10203 and used with permission of the author. All other rights reserved by the author.

TestProject – API Test Automation with Databases and Shell/File Interactions

This week, I continued reading through the TestProject Tutorial blog I began last week moving onto Chapters 3 and 4, which focused on API Test Automation involving database communications, shell commands, and local file interactions.

The Chapter 3 tutorial focusing on database implementation provides examples of testing connections and querying common types of databases, including Oracle Database, Teradata Database, and MySQL Database using TestProject’s Database Addons. It walks through a specific example of testing a connection to an Oracle Database, showing the successful establishment of the connection. This is taken a step further with an example showing the steps of creating a new table with data extracted from an API request, then setting up and performing an HTTP GET request extracting JSON paths and data from the API response and creating a dynamic query into an Oracle Database Table. I found this portion to be particularly valuable as these tasks seem highly applicable and like common requests of a software dev./analyst, like I plan to be after graduating in May.

Chapter 4 focuses on API test automation flows that incorporate a combination of Shell Commands and/or Local File interactions. As an example demonstration, it shows the steps to access a web page and extract the text using CMD shell commands in conjunction with a GET request, then writing the web page contents to the text file. These functionalities can also be easily implemented using SSH commands, which is also demonstrated. Finally, it goes into how to create and edit/interact with .csv files as a part of the test automation workflow, which can be used for test results and report generation (amongst others).

After going through four of the six chapters in this TestProject tutorial, I can confidently say that it’s a valuable resource and reference in learning about software testing and specifically automation, even if I never end up using the platform. I have been finding the examples to be extremely helpful in demonstrating how to actually use the software and perform some simple real-world tasks, breaking it down into individual test steps. While CS courses commonly include some form of tutorial or demonstration exercise, I personally find that they are often simplified to such a degree that the examples are “unusable”, in that no professional in a real situation would encounter and deal with such a simple task. However, these examples go into more complex applications, such as the earlier example using a combination of commands to extract text from a website, create a new file and write to it. Also, the examples within these tutorials tend to cover a variety of platforms/methods depending on the topic (i.e. a variety of popular databases) maximizing the likelihood for the content to be useful to readers. I’m looking forward to finishing out the last two chapters soon!

Sources:
Tutorial Intro: https://blog.testproject.io/2020/11/10/automating-end-to-end-api-testing-flows/
Chapter 3: https://blog.testproject.io/2020/11/10/api-test-automation-flows-combined-with-database-flows/
Chapter 4: https://blog.testproject.io/2020/11/10/api-test-automation-with-combination-of-shell-commands-and-local-files/

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.

Embracing the Future with JUnit 5: A Comprehensive Overview

In the ever-evolving world of software development, JUnit 5 stands out as a beacon for Java developers aiming to elevate their testing strategies. My exploration into the depths of JUnit 5 was guided by an insightful article from Baeldung, which served as a comprehensive tutorial on this powerful testing framework.

Why JUnit 5?

My selection of JUnit 5 as a topic was driven by a desire to understand the latest advancements in Java testing frameworks. JUnit 5 represents a significant leap forward, offering new features and enhancements that promise to streamline the testing process for Java applications.

Insights from the Resource

The Baeldung guide to JUnit 5 provided a thorough introduction to its architecture, annotations, and assertions, which are crucial for creating efficient and effective test cases. It delved into the specifics of setting up JUnit 5, including Maven dependencies, and offered practical examples of its new annotations like @TestFactory and @DisplayName, which bring flexibility and clarity to test design.

One of the most compelling aspects of JUnit 5 that the article highlighted is its support for dynamic tests and the new assertion models that leverage Java 8 features, such as lambda expressions. This enables more expressive and powerful test cases.

Personal Reflection and Application

Reading through the article, I was particularly interested in the intuitiveness of JUnit 5’s approach to unit testing. The framework’s emphasis on extensibility and its modular architecture opens up new possibilities for custom test development. I anticipate utilizing these features to create more comprehensive and maintainable test suites in my future projects, ensuring higher code quality and reliability.

This deep dive into JUnit 5 has not only expanded my knowledge but also heightened my appreciation for the importance of advanced testing frameworks in modern software development. It has reinforced my belief in the value of continuous learning and adaptation in the tech industry.

Conclusion

The Baeldung article on JUnit 5 serves as an essential resource for any Java developer looking to stay at the forefront of testing practices. It offers both a solid foundation for newcomers and deep insights for experienced programmers seeking to leverage JUnit 5’s full potential.

For anyone interested in exploring JUnit 5 further, I highly recommend this article as a starting point. It’s an invaluable resource that combines theoretical knowledge with practical examples, paving the way for more efficient and effective testing strategies.

Read the full article on Baeldung: https://www.baeldung.com/junit-5

From the blog CS@Worcester – Abe's Programming Blog by Abraham Passmore and used with permission of the author. All other rights reserved by the author.

Introductory Blog Post – CS 443

this is my blog post for CS 443 where all my blogs will be posted.

From the blog CS@Worcester – CS- Raquel Penha by raqpenha and used with permission of the author. All other rights reserved by the author.

Software Testing Terms – Can you list them all?

link to blog at the end:

Have you ever heard a word or phrase that you feel like you should understand but you just don’t? It’s happened to many people, and I’m sure it is not uncommon in the software industry. Certain software terms are either confusing or unknown, which is perfectly understandable!

Chris Kenst’s blog post relates to what we studied in class this past week, as it correlates with and even mentions some of the terms we learned, such as black box testing. It will hopefully help the definitions we previously learned stick in my head as the weeks go by.

This blog post is all about lingo. It aims to better prepare students and software-testing newbies for the confusing jargon coming out of their coworkers’ mouths. It is in a simple glossary format, which is easy to understand and refer back to from time to time. There are 50 terms listed as well, so there may be some left out, but the ones listed are what you are most likely to hear in the workplace or in communication. Kenst also mentions at the end of the post that an increased mutual understanding of such terms can lead to increased productivity and collaboration.

I chose to cover this blog post because it is easy to get lost in all the mumbo jumbo tech buzzwords flying around the internet. It is like being a parent and learning what your kids’ slang means; except the kids are your coworkers and the slang is important keywords for your profession. I would not want to be the one guy at a meeting who does not understand “black-box testing” or what “domain testing” is. Jokes aside, this is a great resource for my fellow students to refer back to, especially as we are just beginning our software testing journey. These terms are important to know, because otherwise you might fall behind as new terms and testing variations are created. 

I personally believe this is a great starting point for those new to software testing (like me) and those who might need a refresher every now and then whenever their coworker says something unfamiliar. I learned how “high volume automated testing” involves auto generation, execution, and evaluation of multiple tests that may be weaker and not as thorough on their own, but together expose bugs and weaknesses. I will continue to learn more testing variations and other terms from this list to strengthen my confidence as a software tester and engineer. I hope to apply this knowledge in the future whether it be at a job interview or in a working environment, proving to my coworkers that I understand the language they are speaking and can keep up with their discussions.

Blog: 50 Software Testing Terms Defined – Chris Kenst

From the blog CS@Worcester – Josh's Coding Journey by joshuafife and used with permission of the author. All other rights reserved by the author.

Object-oriented Testing

Object-oriented testing revolves around the examination of individual classes within an object oriented program. Objects are instances of these classes. In the article ” Object Oriented Testing in Software Testing” , the author talks about the evolution between old testing methods to object-oriented testing. The author also talks about the advantages of object oriented testing, which include reliability, extendibility, and reusability.

Navigating Object-Oriented Testing

Strategies and techniques for developing test cases in Object Oriented Testing could include Fault-based testing, scenario-based testing, and class testing based on method testing,. These different test cases / techniques play a pivotal role when it comes to trying to find all defects, improper interactions among classes, or being less time consuming. Object-oriented testing can however present some challenges such as testing inheritance in larger systems or the inability to dynamically test classes.

Why did I pick this Article?

I chose this article because it offers a great understanding of Object-oriented testing and highlights the many techniques that can be used, also the many different advantages of Object oriented testing. Moreover, the article does a good job explaining the evolution of testing methods, to object-oriented testing and some challenges you may face in testing Object-oriented programs.

Personal Reflection

This article has broadened my understanding of object-oriented testing, specifically detailing the transition from old traditional methods to object-oriented. I was also able to grasp the many advantages and challenges that object oriented presents, allowing me to know why we should and should not use it in certain scenarios. The knowledge gained from reading this article will play a pivotal role when approached to testing in object-oriented environments. The knowledge for developing test cases and the advantages and challenges will guide me in future projects.

The full Article is here: https://www.scaler.com/topics/software-testing/object-oriented-testing-in-software-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.

AI In Software Testing

The blog I chose was “Will AI Replace Manual Testers?” by Thijs Kok. The blog post highlighted the importance of testing for software development and the role that AI plays. I chose this blog for two reasons, one due to the fact that we recently discussed the types of testing in software development. The other reason being the rise of artificial intelligence popularity in the software and technology field. I thought this blog was able to highlight one of the main fears that people who are studying computer science or people who are already in the field have when it comes to artificial intelligence. This fear being is artificial intelligence going to be able to take over our jobs. We have seen just what artificial intelligence is able to do through a multitude of examples showcasing just how advanced the AI is when it comes to solving programming problems. For those reasons, that is why I chose this blog because I thought it would be interesting if AI could take over this aspect of the jobs we want.

The blog post started off by acknowledging the power AI has right now throughout the world and how the tech field is no exception. The author described three ways how AI is already being utilized within the software testing scope. These ways being test case generation through, test case execution and test result analysis. The blog post ended with the overall question, will artificial intelligence replace testers? The conclusion that the author reached was, no, “While AI can automate specific testing aspects, it cannot entirely replace human testers. The cognitive skills, creativity, problem-solving abilities, and emotional intelligence that human testers bring to the table are irreplaceable”. The author stated that even though AI can be very powerful it can be seen more as an enhancement rather than a replacement.

My overall take from this blog post is the importance in understanding how AI works and how to integrate to use it as a tool for the future. While we can’t use the AI to just do the work for us it can be a helpful asset that will make the job easier allowing us to focus our efforts on more important matters, things that the AI otherwise could not handle. I believe that the blog post was a great piece that anyone could read and take away various insights from. For example, it was able to downplay people’s fears on AI taking over as well as teaching people how to use it to their benefit allowing integrations for the future.

https://www.testmonitor.com/blog/will-ai-replace-manual-testers

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.

Software testing

In the fast-evolving world of software development, the significance of rigorous testing cannot be overstated. A recent blog post from The Code Camp titled “Software Testing and Why It’s Important” delves into this critical aspect, shedding light on its indispensability in the development process. This article serves as a comprehensive guide, explaining the necessity of testing, its types, and methodologies, thereby making it an invaluable resource for developers and testers alike.

The Essence of Software Testing

Software testing stands as a cornerstone of development, ensuring that applications perform as intended, are secure, reliable, and user-friendly. The article articulates how testing not only identifies bugs but also secures software against potential cyber threats, a growing concern in today’s digital age. By involving real users, testing guarantees that the software offers a seamless user experience, an aspect critical to the success of any application.

Why This Article?

I chose this resource because it offers a profound understanding of testing’s role in the development lifecycle, a topic directly related to our coursework. The article’s clear explanation of various testing types, such as unit, integration, system, and acceptance testing, complements our learning, providing practical insights into their applications.

Personal Reflection

Reflecting on the content, I was particularly struck by the emphasis on security and user-experience testing. In an era where digital threats are rampant and user expectations are high, these aspects of testing assume paramount importance. This article reinforced my understanding of the multifaceted nature of testing, extending beyond mere bug detection to encompass a holistic approach to creating robust, secure, and user-centric software.

Application in Future Practice

Moving forward, I plan to integrate these insights into my testing strategies, particularly the early involvement of real users through acceptance testing and the rigorous assessment of security vulnerabilities. Emphasizing these areas will not only enhance the quality and security of the software I contribute to but also ensure a superior user experience. Security is something that I have wanted to learn more about for a long time and I think testing is a good way to move towards that

Conclusion

The insights gained from “Software Testing and Why It’s Important” are instrumental for anyone involved in software development. It underscores the critical role of testing in delivering high-quality, secure, and user-friendly software, aligning perfectly with the principles we’re learning in our course. For those interested in exploring this topic further, the full article is available at The Code Camp, offering a deeper dive into the vital world of software testing.

From the blog CS@Worcester – Abe's Programming Blog by Abraham Passmore and used with permission of the author. All other rights reserved by the author.

My Blog

Hi my name is Kaylene and this is my blog.

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.

New Class! New Posts!

Hello! I will be continuing the blog posts pertaining to my course. The class I am currently in is Software Quality Assurance and Testing. CS443_01_SP_2024

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