Category Archives: Week-15

Pairwise Testing

Another important topic that we have discussed in CS-443, or Software Quality Assurance and Testing, is known as Pairwise Testing. Pairwise Testing is yet another form of testing, but this type is a little bit different than the rest. Pairwise Testing, sometimes known as all-pairs testing, tests each pair of input parameters in order to make sure that the functions in the system run correctly no matter what the input is, guaranteeing that it will run for every combination. Pairwise Testing is known as a Permutations and Combinations (P&C) based software testing technique. A blog that I found to be really helpful in explaining Pairwise Testing is known as Pairwise Testing | What It Is, When & How to Perform by Kiruthika D. In the blog, she gives an example that helped me understand more. She states “Let’s say you have an application that allows users to enter two numbers, and the application will output the sum of the two numbers. You can use pairwise testing to test all possible combinations of two numbers, such as (1, 2), (2, 3), (3, 4), (4, 5), etc. By testing all the combinations of two numbers, you can be sure that the application is working correctly and will not fail when given different numbers.” This shows that you don’t actually test every single combination, but you test every single input with another input. This way, it makes sure that all of the inputs work instead of testing a potentially infinite amount of combinations.

The actual purpose/use of Pairwise Testing is exactly what I previously stated. It is used to make sure that all combinations of inputs are possible, but you don’t need to test every single combination. It can be extremely helpful as it reduces the amount of time it takes to test the program as well as the amount of effort. While Pairwise testing is a great testing technique, you obviously can’t use it all the time as it involves pairs. As for when to use it, Kiruthika states “Pairwise testing is helpful when testing complex systems that have multiple input parameters and multiple possible values for each parameter. It can significantly reduce the number of test cases that need to be created while ensuring that all possible discrete combinations of parameters are tested. This can help reduce test case creation time and cost and improve the software’s overall quality. Pairwise testing is not appropriate for all types of software testing. As we discussed, it is most effective for systems with multiple parameters and multiple possible values for each parameter. If a system has only a few parameters and a small number of possible values for each parameter, pairwise testing may be unnecessary. Pairwise testing, also, will not be useful if the values of inputs are inappropriate.” Essentially she is saying that Pairwise testing is used for functions that have multiple parameters with multiple values, and the order of parameters doesn’t matter. On top of that, depending on the type of parameter, the technique might not work either. While I personally don’t see myself using this technique in the future, I think that it has the opportunity to be very useful in certain situations, so I’m glad that I was able to understand it more in case I ever need to use it.

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

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.

Unit Testing

For this week’s blog post, I decided to discuss the article “Unit Testing vs Test-Driven Development” by Albert Stec. I chose this article because it compliments the unit testing topic in the syllabus. This article discusses what unit testing is, why its important and how it fits into test driven development.

The first part of this article spends some time defining what a unit test is. Unit test is usually a method that validates a small portion of the source code. So, the unit test is a programmatically written, automatic test. The unit test takes the initial data, passes it to the code under test, and asserts if the execution result is the same as the expected result.” The article then goes on to discuss what a well designed unit test should have.

The five most important parts of writing a good unit test according to the author are that it is fast, isolated, deterministic, readable and simple. “As we can see it looks simple. Although writing efficient unit tests could be complicated depending on the code we want to test. A well-written unit test should be: 1: Fast. A single project can contain a big number of unit tests, even hundreds, or thousands. Moreover, unit tests can be executed often, e. g., while developing a new feature to avoid regression or in CI/CD pipelines. Therefore, they must run as fast as possible. 2: Isolated. A unit test shouldn’t modify or depend on any external state. 3: Deterministic. A unit test should always return the same result no matter how many times we execute it. Of course, if nothing is changed between runs. 4: Readable. Unit tests are code that needs to be maintained. Therefore, it should be clear and easily understandable. 5: Simple. Often we can read that the unit test should contain a single assertion. Although it can be discussable, the fact is unit tests should validate small portions of the source code.” The next part of the article discusses the importance of unit testing in regard to software development.

This last part of the article discusses how unit testing is important to unit testing development. “To write appropriate unit tests before the logic developers spend more time on analyzing and understanding the problem and its domain. Therefore, the code is more likely to meet all requirements and clients’ needs. It’s one of the most important aims of TDD. The cycles play an important role, as the tests become more specific with time while the implementation becomes more generic.”

Article: https://www.baeldung.com/cs/unit-testing-vs-tdd

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.

“TestGuild Automation Podcast”: A Great Resource for Future Developers

The “TestGuild Automation Podcast” is a fantastic resource for computer science students preparing to enter the professional world. Hosted by Joe, the podcast dives deep into the realm of automation testing—a key aspect of software development where code is used to test other code. This method is vital as it helps detect and resolve issues quickly and effectively.

Joe has a unique ability to demystify complex testing concepts, making them accessible to listeners of all levels. His clear and straightforward speaking style ensures that even those new to the topic can grasp the essentials. The podcast is not just about learning; it’s an interactive platform where listeners can hear from seasoned professionals in the field. These guests share their journey, the challenges they’ve encountered, and the strategies they’ve employed to overcome them. This real-world insight is invaluable, as it shows the practical applications of theories and methods discussed.

The interviews with experienced testers and developers are particularly enlightening. They discuss not only technical challenges but also the dynamics of working in teams. This aspect is crucial in the tech industry, where collaboration and communication are as important as technical skills. The podcast sheds light on the collaborative nature of software development, emphasizing the importance of developers and testers working together to achieve the best results.

Here are some key takeaways from the “TestGuild Automation Podcast” that are especially beneficial for CS students:

  • The inevitability of bugs: No matter how skilled a programmer you are, errors are inevitable. Testing is essential for finding and fixing these bugs before the software goes live.
  • Creative problem-solving: Automation testing requires a creative approach to problem-solving, akin to the creativity needed in coding. Testers need to think outside the box to identify potential failures and vulnerabilities in software.
  • The importance of teamwork: The podcast highlights how effective collaboration between developers and testers leads to the development of robust software. It’s a reminder that everyone’s role in a tech project is vital and interconnected.
  • Career preparation: Understanding the basics of testing and quality assurance is a significant advantage in the job market. Employers value developers who are well-versed in these areas as it contributes to the overall quality and reliability of their products.
  • Enhanced coding skills: By learning about testing, developers can anticipate potential issues and write cleaner, more efficient code from the outset.

For those who are not only interested in coding but also in the broader aspects of software development, the “TestGuild Automation Podcast” is an excellent resource. It provides a comprehensive overview of the testing landscape, offering insights that are crucial for any aspiring developer who wants to excel in the tech industry.

I highly recommend giving this podcast a listen. It’s not only educational but also engaging, making complex topics understandable and interesting. 

Link: https://testguild.com/podcast/

From the blog CS@Worcester – Site Title by Iman Kondakciu and used with permission of the author. All other rights reserved by the author.

Exploring the “Code Review” Podcast: A Path to Coding Improvement

Why I Like the “Code Review” Podcast and How It Helps Me Code Better

As a CS student, I’m passionate about finding ways to level up my skills. Lately, I was listening  the “Code Review” podcast, and it’s become an unexpectedly valuable resource. Honestly, I used to think code reviews were only for those super experienced developers, but this podcast has completely changed my perspective.

What the Podcast is About

Think of this podcast as your guide to making your code the best it can be. They discuss everything from finding those pesky hidden bugs to making your code easier for others (and future you!) to understand. They also dive into the specific rules and guidelines that professional coders follow. The best part is that they explain everything clearly and use real-world examples to make it relatable.

What I Learned and How It Changed My Coding

  • Cleaner, More Reliable Code: I’ve picked up tons of tricks for writing code that’s well-organized and works the way it’s supposed to. This translates directly to better projects and way fewer frustrating “why-doesn’t-this-work?” moments.
  • Becoming a Bug Detective: The podcast stresses the importance of having an eagle eye when reviewing code. I’m now way better at spotting potential issues early on, saving myself loads of time and headaches later.
  • Understanding the Pro Mindset: Learning about the standards used in professional coding environments has been an eye-opener. It helps me understand what I’m doing well and where I can improve. This knowledge feels incredibly useful when working on school assignments and makes me feel more prepared for internships or jobs down the line.
  • The Power of Collaboration: The podcast made me realize that code reviews aren’t about criticizing. Instead, they’re about teamwork and creating the strongest software possible. I’m excited about the idea of collaborating with other coders to make something great.
  • Becoming a Helpful Code Reviewer: The hosts discuss helpful strategies for reviewing other people’s code, offering constructive feedback, and being a good coding teammate. I’ve become more confident in my ability to help others while also learning from their work.

Why I Recommend This Podcast

The “Code Review” podcast avoids overly complicated lingo, so it’s accessible even if you’re still learning the basics. I also love that I can listen while doing other things and still pick up incredibly useful knowledge.

You can find the “Code Review” podcast on most popular podcast platforms. If you’re eager to improve your coding skills, gain a deeper understanding of software development, and become a fantastic team player, I highly recommend checking it out.

Link: https://player.fm/podcasts/Code-Review

From the blog CS@Worcester – Site Title by Iman Kondakciu and used with permission of the author. All other rights reserved by the author.

Security Testing

As we transition into a time in which technology is an integral and nearly essential part of daily life, the necessity of security in the technology we use becomes ever so important. Apps, devices, websites, and everything in between may have access to your personal information. You may have entered passwords, names, bank information, card details, and much more when using these things and possibly even allowed them to save that information. You may have confidence that your information will not be leaked or stolen but even with the biggest, most trusted companies, it is not impossible. 

To combat the potentially massive amount of information from getting into the wrong hands, we perform what is known as security testing. Security testing is an “aspect of software testing focused on identifying and addressing security vulnerabilities in a software application… and… it aims to ensure that the software is secure from malicious attacks, unauthorized access, and data breaches” (hackerone). It ensures that users have their privacy, the system is safe and secure, and that the software meets regulations. 

Security testing involves identifying vulnerabilities in the software through means of scanning, hacking, and evaluating it. Hacking is a method that seems to stand out compared to the other likely due to how it’s unique to security. Hacking falls under what is known as Penetration Testing which involves simulating real-world attacks on the software in order to expose vulnerabilities. Hacking, by definition, is the gaining of unauthorized access to data in a system or computer, but in this case this form of testing falls under ethical hacking. Ethical hacking is essentially hacking but with legal authorisation and is intended solely for security reasons. Overall, security testing is the perfecting of a software’s security through means of identifying and exposing weaknesses and remediating them.

I’ve actually had my debit card info taken in the past and my money used to purchase things without my knowledge. Thankfully, I got all my money back as well as a new card but, at the time, I was extremely anxious and worried. I was desperately searching for what could have taken my information and to this day, I still have no clue. It was likely my fault for putting my information in some shady place but there’s a chance that a site or app I had my info in and trusted was breached. I believed that I was being very careful with what information I shared and where I shared it but that situation really shook me. Security testing is not a topic we went over in class but it is a good topic to learn about nonetheless. Although learning about the testing of security is not something that everyone is interested in, I believe that teaching people how to protect their information is becoming more and more important.

https://www.hackerone.com/knowledge-center/what-security-testing#:~:text=Security%20testing%20is%20an%20important,unauthorized%20access%2C%20and%20data%20breaches.

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

Code Review Essentials: A Critical Tool for Development

Blog Entry:

As a student deeply involved in computer science, understanding the significance and methodologies of code review is pivotal. This week, I chose to delve into an article from freeCodeCamp, titled “Code Review: The Ultimate Guide,” which explores the intricacies of code reviews in software development. This resource is particularly relevant to our ongoing discussions in class about software quality and maintenance.

Summary of the Article:

The article comprehensively outlines what code review entails and why it is a critical practice in software development. It discusses the benefits, such as catching bugs early, improving code quality, and fostering team knowledge sharing. Moreover, it provides practical tips on how to conduct effective code reviews, emphasizing the importance of a constructive attitude and specific, actionable feedback.

Reason for Selection:

I selected this resource because, as we learn to code and develop software, understanding the peer review process is essential for professional growth and skill enhancement. This article not only complements our coursework but also offers practical advice that can be immediately applied in any coding environment.

Personal Reflection:

Reading about the detailed processes and benefits of code reviews has been enlightening. I learned that effective code reviewing goes beyond merely finding errors; it is about collaboration, learning, and improving as a team. This has changed my perspective on coding assignments and projects. Instead of viewing them as solitary tasks, I now see them as part of a broader, collaborative process.

I am particularly struck by the emphasis on the mindset and communication skills needed during code reviews. The idea that feedback should be constructive and focused on the code rather than the coder is something I plan to carry forward into my professional life. This approach not only minimizes potential conflicts but also enhances the learning environment, making it more open and conducive to improvement.

Application in Future Practice:

Going forward, I expect to apply the principles from this article in my class projects and eventually in my professional work. Understanding the dynamics of effective communication and feedback within code reviews will be crucial as I work with others on software development projects. This will help in creating more robust, error-free software and in building a supportive team environment.

It is an important skill for everyone regardless of their place in the chain of development. The principles also apply outside of the field of computer science as a successful review is a part of any team process.

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.

REST API (Token blog)

When I was first introduced to the concept of an API, a shortened abbreviation of Application Programming Interface, I never thought of it being used far outside the scope of Computer Science.  However, as I revisited some software that I used in the past and observed the current software I worked with recently, I was more than surprised by the fact that an API is universally used across the Internet.  For this blog, I explored a blog called “10 Most Popular Frameworks For Building RESTful APIs” written by Developer Advocate at Moesif, Preet Kaur. In this blog, the author explained that when deciding on the API framework to use, you needed to choose one that uses a programming language that you are familiar with, but you can also use in spite of its shortcomings.  Further down the blog, she gave some examples of popular API frameworks that are used by many developers; one of those frameworks that was mentioned was Express JS, a framework I am familiar with.

One of the biggest contributing factors that brought me to use this article for this blog is not only the different frameworks that Kaur had given examples of, but also where you can find and learn about them.  Reading this blog got me hooked on the many different types of API frameworks that I could look at to familiarize myself with each that may give me a better understanding of the specifics of REST API for my drive toward a career in Software Engineering.  Even if the frameworks in question were written in programming languages that I am not as efficient in programming in, I still believe that this blog has helped me in understanding the overall meaning of building an API for use in creating applications and beyond.

My biggest takeaway from this blog is that the API framework you use to build an application, software or other kind of design is not only dependent on your skill at programming or engineering, but also what your goal is with using the framework you choose for your creation.  While this blog was more general than the previous ones I read through, I still stand with a vision that the API framework that I use will only be as helpful as the skills I use to develop and engineer my path to a greater goal in creating the perfect software.

Reference: https://www.moesif.com/blog/api-product-management/api-analytics/10-Most-Popular-Frameworks-For-Building-RESTful-APIs/

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

“Record What You Learn”

From the blog cs@worcester – Dahwal Dev by Dahwal Charles and used with permission of the author. All other rights reserved by the author.

“Share What You Learn”

It is essential to know when to fail. So, we start learning when we fail. In our journey, we experience these expansion failures. This template explains how to speed up the sharing of the knowledge we have gathered and pass it on to people. 

When I read this pattern, we were working as a team, and we agreed. Communication is the key. Communicating our knowledge can make a difference. Always be supportive and help each other. As a team, they are responsible for all tasks. Why are you selfish about what you know? After all, it won’t help anyone, and it won’t help you either. The problem is that you must rely upon others to catch up. And another point is that they may not like or appreciate if you are a trainee and if you can influence your team or individual based on your experience, so knowing I can’t do that. Therefore, the model shows that you or someone else can try to save what you have learned along the way only if you need it for future purposes.

For this pattern, I disagree on the part on whether it may not be appreciated towards others. But the problem is that I do not know why it would be a problem as people can be mature enough to give feedback on the person taking their time to share what may be a discovery for others. They can always have the option to not accept the knowledge and do, however. Should not be hindered from one or more person opinion. 

Believe that it is important to share the knowledge acquired. knowledge is power. Also, teaching this knowledge is a great and powerful collaborative tool that we must learn ourselves. I know as a software developer; I will face these challenges and must make the right choices for the best of the team I work with or for myself to perfect my work ethic. People may not like what others have to say and may not do it the way you expected. But pay more attention to this cause. I practice recording everything I learn and realize that delivery is important, or I can quickly contact someone in a situation like this.

From the blog cs@worcester – Dahwal Dev by Dahwal Charles and used with permission of the author. All other rights reserved by the author.

Find Mentors

Summary:

Find Mentors pattern is about asking for help while exploring the unknown. Every time we decide to take a new path – learn a new language, we do not know what is in store for us and therefore have no clue as to how deal with problems that we might face. The pattern recognizes that as new apprentice we will need help facing these problems and in reaching our goal.

The solution pattern provides is to learn under a master craftsman in the field of your choosing – a mentor. The pattern also realizes that as a novice it is difficult to identify a true master craftsman and therefore during the process of acquiring the new skill we will be guided by a number of mentors with diverse levels of mastery. The pattern states that it might be easy to find authors, bloggers, professional speakers, and developers in computer science field. However, there are two problems; first, they might not be interested in mentoring; Second, asking someone to be your mentor can be very intimidating. The important point pattern makes here is to have determination and remember that the risk of rejection is very low compared to huge opportunities having a mentor can provide.

The pattern also warns us about blindly following someone. We need to keep our eyes open to the mentor’s weakness and resist the temptation to believe everything they say. No one knows everything about everything. Therefore, we need to keep finding other master craftsman and keep polishing our skills.

Why I choose this?

Computer science is a very difficult field to begin with and then on top of it – it is an ever-evolving field. The amount of knowledge available is immeasurable. The pattern ‘Reading List’ helps us organize the books we need to read, which as we all know does not give practical explanation, real world connections or real time feedback. Moreover, to start our reading list and even to make sure that we are reading the correct books – we need to find someone we can trust – someone like a mentor.

Over the last four years I have been able to find a number of mentors. They have ranged from professors to my peers, family and friends to people in slack and discord communities. It has been an amazing experience. I have learned from them and with them.

From the blog CS@worcester – Towards Tech by murtazan and used with permission of the author. All other rights reserved by the author.