Category Archives: CS@Worcester

mocking review (and more)

A while ago, we used the Mockito framework in Java during an in-class activity. If I’m being honest, I wasn’t paying full attention to the material, and so I wanted to review some of the material in addition to looking into mocking more.

The idea with mocking is that unit testing without the actual classes being written is problematic solely because we can’t actually test stuff that isn’t written. This mostly applies to a specification-based testing environment, a subset of black-box testing. Mocking solves this by simulating the construction of objects and allowing set values to pass through for tests, which can then be refactored once the classes are actually created. As such, we can have tests created for the behaviors we want in our project, without having written the project yet, which is great if we’re applying specifications to tests.

This contrasts with stubs, pieces of code that are written as minimally as possible to get the test suite to function. Stubs are useful in that they can quickly provide the correct result for a test without the need of an outside resource, but what seems to happen is that as you write more tests, you end up writing the actual program in the process to make the tests match. This is good for test-driven development, where we actively write tests while we code the actual program, but if our interest is solely on writing the tests based on specifications, this isn’t a great approach.

According to a blog post by Rohit Khankhoje, mocks are great in that they are more cost-effective, acccessible and efficient than writing stubs or creating fakes. By setting up mocks, you have less set-up time for tests because you don’t need to have the system accessible in order to have a fully functioning test suite. While this is great, there are some obvious drawbacks. For example, tests that utilize mocking will still frequently have to adapt to new code changes when functionality is added to the project. This is more pressing with the idea in mind that tests will continue to pass with mocks despite code in the actual project changing, and so mocked tests need to be developed side-by-side with the actual code, otherwise the testing suite isn’t actually portraying accurate information regarding the accuracy and performance of the system.

As such, while mocking is a very strong tool, it seems to only be very useful in an environment where we don’t have access to code, and when we do have access to code (or we are also the coders ourselves, not just testers) it seems much more efficient to implement test-driven development.

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

Draw Your Own Map

The draw-your-own-map pattern talks about how people should take control of their career paths and not rely on others to define their path. This pattern talks about identifying the next logical steps, visualizing how to achieve those steps, and continuing to evaluate their goals and values. Draw-your-own-map pattern suggests that getting help from like-minded people and being open to adjusting one’s map to any changes that came up. This pattern shows stories about people who go into programming despite challenges from employers and orginizational limits. Draw-your-own-map encourages people to set a specific goal rather than setting a goal that isnt reachable. That step not only helps provide feedback but it also makes you seek guidance from like-minded people, those people can give you resources and support when trying to achieve your goals. One of the key ideas of this pattern is flexibility, it supports the idea of one’s mind to keep reassuring themselves that it’s okay to make changes. This pattern promotes an approach to career development and make sure to empower people to find their way through there careers with a purpose.

I thought this pattern was interesting because it encourages people to be creative and not rely on other people to define our paths, it should be our decision. I also thought the steps that the pattern talks about was very helpful, it’s important to set realistic goals so that you don’t overwork yourself to reach that goal. Visualizing the steps to achieving those goals also help make sure you don’t rush through the process and able to have a set plan. Evaluating your goal and values are also important as you go on to make sure that you can still reach your goal and be okay with any changes that come. This pattern has changed the way I think about achieving my goals, I know now to set a more realistic goal for myself and not be scared to get help from people who think like me. I don’t disagree with this pattern because I feel like this will help a lot of people with reaching their goals and make them think more realistically while getting support from others.

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.

Expand Your Bandwidth, Expand Your Mind

In the fast paced Software Development field, staying ahead is not just advantageous but essential. Yet, many of us tend to find ourselves stuck in a rut, focused solely on the task at hand and neglecting the broader landscape of knowledge and innovation. The Expand Your Bandwidth pattern emphasizes the importance of continually expanding our knowledge and skills beyond just the day to day tasks we complete. Additionally, the importance of actively seeking out new information and participating in various learning opportunities to help accelerate our professional growth.

What I found particularly interesting regarding the pattern is the notion that we all want to achieve mastery following the long road, but achieving that mastery level is more than just mastering a specific technique or technology, but rather about cultivating a broad and adaptable skill set. The pattern also presents an analogy for learning through a straw and a fire hose. By immersing ourselves in a fire hose of information, while it may be overwhelming, is incredibly empowering. Therefore challenging the notion of compliance and encouraging us to continually learn, explore, and experiment.

After reading more about this pattern, it has changed the way I think about my approach to learning and professional growth. Previously, I tended to focus solely on completing immediate tasks, projects, and work, ignoring the broader landscape of knowledge and innovation. However, this pattern has inspired me to adopt a more expansive mindset and go out of the box to seek different opportunities for learning and growth. 

While I embrace the message from this pattern, I do think it is important to limit how much information we try taking in all at once. If we don’t manage all the information properly or carefully, it could lead to an information overload and overwhelm or stress us out.

With this being said, the Expand Your Bandwidth pattern helps serve as a powerful reminder of the always changing and evolving field and the importance of continually trying to learn more and more to increase our skillset. By embracing this pattern, I am confident that I will not only enhance my skills as a developer but also create a mindset of lifelong learning and adaptation, which is essential for success in our dynamic field.

From the blog CS@Worcester – Conner Moniz Blog by connermoniz1 and used with permission of the author. All other rights reserved by the author.

Week 12 Blog Post

The article “Evaluating Test Cases, Checks, and Tools” explores into the process of evaluating the efficiency of test cases, checks, and tools in software testing. This blog post was written by Michael Bolton, a renowned software tester and consultant, the article provides insightful perspectives on how to critically evaluate these elements to improve the quality of testing practices. Bolton begins by separating between test cases and checks. Test cases are comprehensive procedures designed to explore the behavior and functionality of a software system. On the other hand, checks are automated scripts that verify specific phases of the system’s behavior, typically based on a criteria. While both are important to testing, Bolton emphasizes the importance of recognizing their distinct purposes and limitations. The author highlights the significance of evaluating the value and effectiveness of test cases and checks. Rather than blindly holding to predefined test cases or relying only on automated checks, testers should continually assess their importance and effectiveness in uncovering defects and providing meaningful feedback. Bolton encourages for a dynamic and adaptable approach to testing, where testers actively engage in critical thinking and exploration to uncover issues. Also, Bolton discusses the role of testing tools in the evaluation process. While tools can speed up certain testing activities and enhance efficiency, they are not a answer for all testing challenges. Testers must carefully evaluate tools based on their suitability for the given context, considering factors such as work use, compatibility with the testing environment. Throughout the article, Bolton emphasizes the importance of context-driven testing, where testing strategies are tailored to the unique characteristics and requirements of each project. He encourages testers to adopt a mindset of examination and experimentation, continuously seeking opportunities to improve their testing approaches and improve overall effectiveness. “Evaluating Test Cases, Checks, and Tools” offers valuable insights into the nuanced process of evaluating test cases, checks, and tools in software testing. By organizing a critical and context-driven approach, This was an interesting read considering it was very much so what we have been learning this semester. It helped me understand the value and importance of organizing test and to learn more of adaptable approach of testing

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

Week 11

Mocking is a process used in unit testing when the unit being tested has external dependencies. The purpose of mocking is to isolate and focus on the code being tested and not on the behavior or state of external dependencies. These dependencies, such as databases, external services, or third-party libraries, may be difficult to control or reproduce in a testing environment. By creating mock objects that mimic the behavior of these dependencies, we can isolate and test individual components of our code in a controlled and predictable manner. Some benefits of mocking include isolation. Mocking allows us to isolate the unit of code being tested from its external dependencies, ensuring that tests focus solely on the logic within the unit itself. Mock objects provide precise control over the behavior and responses of dependencies, enabling us to simulate various scenarios and edge cases during testing. Debugging is another benefit of mocking. Mock objects can be used to debug code by providing detailed information about how a method is being called and what values are being passed to it. Collaboration:Mock objects can be shared among developers, making it easier to collaborate on testing and ensure that code is tested consistently across different environments.

Some of the challenges that mock testing can cause is maintenance. Mock objects can be difficult to maintain, particularly as systems evolve and change over time. When new features are added, mocks may need to be updated to accurately reflect the behavior of the system. Complexity is another problem. As the complexity of a system increases, the complexity of the mock objects used to test it may also increase. This can make it difficult to understand and modify tests, particularly for developers who are not familiar with the system. Some mock testing best practices include using mock testing sparingly. It’s important to use it well and not rely on it too heavily because it can be hard to maintain. Keeping mock objects simple is important. Mock objects should be simple and easy to understand, with clear and concise code. Write test cases first: Writing test cases before writing code can help ensure that code is designed with testing in mind and that it can be easily tested using mock objects. I chose this article because it talks about the pros and cons of. Using mock testing as well as strategies to use in order not to find a lot of issues with it. Mock testing can be complicated when it’s overly used therefore it’s not advisable to use it all the time.

References.

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

Performance Testing

Performance testing is a big part of software development, it helps make sure that the final product can run smoothly without any errors and gives the user an easy experience. The main aspect of product testing is performance testing, which evaluates the speed and stability of the system. The point is to identify and address any performance bottlenecks that could give the user a bad experience. When dealing with performance testing it should always be used after functional testing, as soon as the basic function of the system is tested and verified. Performance testing involves testing a bunch of different parameters like processing speed and workload efficiency. By measuring the response time under different conditions developers should be able to find areas that need improvement and target system performance. So many companies should make sure to sort performance testing by doing diagnostics aid and software problem identification.  Diagnostics aid is when performance testing helps identify computing bottlenecks in the system and allows developers to use recourses to improve its performance. Software problem identification shows the areas where the application is failing and shows developers how to address the software performance issues. Performance testing plays a big role in evaluating the system’s performance, it helps provide ideas about what areas to work on to improve the performance.

I picked this topic because we have been working on testing in class a lot more recently and thought that this topic is a great choice to get a better understanding of performance testing as well as product testing. Performance testing helps developers address common problems and provide solutions to tackle these problems.  I learned that there are different ways to approach performance testing when doing it for example by analyzing the data I would want to share or use those results and retest it after making some small changes. This information has helped me look at system testing a little differently since we’re working on system testing in class but this new information will help me in the future to make sure that I focus on the system behavior and include the test in the development process to make sure that the system runs smoothly.

https://www.techtarget.com/searchsoftwarequality/definition/performance-testing

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.

The Vital Role of Test Plans in Software Engineering

In the intricate world of software engineering, the creation and implementation of a test plan stand as a cornerstone of project success. Test plans, detailed documents outlining the strategy, objectives, schedule, and necessary resources for software testing, play a pivotal role in ensuring that a software product not only meets its intended specifications but also delivers a reliable and functional experience to users.

What is a Test Plan?

At its core, a test plan is a blueprint for the testing process. It begins with a skeletal structure at the project’s inception, fleshing out with details as the project progresses. This dynamic document covers everything from the scope of testing and available resources to the specific methodologies that will be employed to assess each feature of the software product.

Types of Test Plans

Understanding the different types of test plans is crucial:

  1. Master Test Plan: This document offers a comprehensive overview of the testing approach across different test levels, providing insights into the testing efforts and strategies to be employed throughout the project.
  2. Test Phase Plan: Focused on specific test levels or types, these plans delve into the details not covered in the master test plan, outlining schedules, benchmarks, and necessary activities for each phase.
  3. Specific Test Plans: These are dedicated to specific types of testing, such as performance or security, focusing on the unique requirements and methodologies applicable to these areas.

Objectives and Importance of a Test Plan

A well-crafted test plan serves several key objectives:

  • It outlines the start and end points of the testing process, detailing the resources needed.
  • It acts as a roadmap, specifying detailed tasks and guiding the project through its phases.
  • It anticipates challenges, offering solutions and organizing stakeholder interactions effectively.

Moreover, a test plan is crucial for facilitating communication within the team and with stakeholders, helping manage changes and ensuring that testing remains aligned with project requirements.

Key Components of a Test Plan

A robust test plan includes several essential components:

  • Resource Allocation: Who will test what?
  • Training Needs: Identifying skill gaps and training requirements.
  • Scheduling: Planning milestones and task durations.
  • Tools: Listing software and tools for testing and reporting.
  • Risk Management: Identifying potential risks and mitigation strategies.
  • Approach: Detailing the testing strategy and scope.

Crafting an Effective Test Plan

Creating an effective test plan involves several steps, from defining the document’s identifier and introduction to outlining the test items, features to be tested, and the testing approach. It also includes planning for staffing, scheduling, risk management, and detailing the deliverables that stakeholders can expect.

In the evolving landscape of software development, the importance of a comprehensive test plan cannot be overstated. It not only ensures the functionality and reliability of the software but also streamlines the development process, making it more efficient and effective. By adhering to a well-thought-out test plan, software engineering teams can navigate the complexities of project development, mitigate risks, and achieve their goals with precision.

All the data are related to this initial blog which helped me understand more about Software Testing: https://www.knowledgehut.com/blog/software-testing/test-plan-in-software-testing#frequently-asked-questions

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

“Expose Your Ignorance”: Transforming Vulnerability into Strength

Summary of the Pattern: “Expose Your Ignorance” is a pattern that challenges the common fear of appearing unknowledgeable in professional settings. It encourages individuals to openly acknowledge the areas in which they lack understanding or skill, rather than concealing their ignorance. This approach is presented as a method for accelerating learning and building genuine connections with colleagues who can provide support and knowledge. The pattern emphasizes that admitting ignorance is a step towards expertise, as it directly confronts what one needs to learn.

My Reaction: Encountering “Expose Your Ignorance” was both a relief and a revelation. It addresses a deep-seated fear many of us have: the fear of being judged for what we don’t know. This pattern not only normalizes but celebrates the act of admitting ignorance as a courageous step towards personal and professional growth. It has made me reconsider how I approach learning and collaboration, highlighting the value of vulnerability as a tool for building trust and fostering an environment where knowledge sharing is encouraged.

Insights and Changes in Perspective: This pattern has significantly shifted my perspective on learning and growth within professional contexts. Rather than viewing ignorance as a weakness, I now see it as an opportunity—an invitation to learn and to invite others into my learning journey. This change in mindset has encouraged me to be more proactive in asking questions and seeking out resources, knowing that each act of vulnerability brings me closer to the expertise I aspire to.

Disagreements and Critiques: While the ethos of “Expose Your Ignorance” is powerful, it’s important to acknowledge the varying degrees of safety within different workplace cultures for such vulnerability. In environments where admitting ignorance is not valued or might even be penalized, applying this pattern requires careful navigation. Thus, while I agree with the principle, its application must be adapted to the specific dynamics and culture of one’s workplace.

Conclusion: “Expose Your Ignorance” has profoundly influenced my approach to learning and professional development. It has taught me the strength in vulnerability and the importance of creating a culture that supports growth through openness and curiosity. I think that it is a very strong tool to learn new skills and to master old ones. I have used it many times in the past when feeling overwhelmed about a large task or a new topic. As I continue in my career, I am committed to living this pattern, fostering environments where ignorance is not a stigma but a starting point for collective learning and innovation.

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.

CS-443: Week 12

Test Driven Development (TDD)

Test driven development is a form of testing done in software development that focuses on creating unit tests before the actual code. Developers create small test cases for every feature with the intention of modifying the code only when the tests fail. Test driven development is also a practice that focuses on the structure of the code that allows for the creation of optimized code that remains reliable over time.

TDD vs Traditional Testing

As stated above, one of the main differences between TDD and traditional testing is that tests are created before the actual code unlike traditional. However some other differences include the testing scope and the processes that each form of testing follows. The testing scope in TDD focuses on testing small, individual pieces of the codebase whereas traditional testing tests the entire system including integration testing. The process of each type of testing also differs in that TDD is an iterative process. As tests are created, this process also includes cycles of developing small chunks of code, testing that code, then refining until all tests pass. An important part of the TDD process is refactoring. Once tests pass, it’s important to check the code if there are any optimizations that can be made, or if there is any redundancy that should be removed.

Benefits to TDD

Test driven development allows for the creation of optimized code by nature because of the process that TDD follows. Once code is written, if the tests fails then the developer is forced to go back and fix the code until the tests pass. The test coverage that TDD covers is greater than traditional testing methods. This is because before any code is written for a specific functionality, the test is created beforehand which ensures every function passes testing. Using test driven development also helps in reducing the number of larger, more complex issues that arise. This is because testing is done on a consistent basis, where development does not progress until each set of tests are complete.

Conclusion

I chose this article because it clearly explained what test driven development is, differences between traditional and test driven development, and the benefits. I also appreciated the use of examples the article used to further explain what the TDD approach would look like in real scenarios. Learning about different approaches to developing software is helpful because I am exposed to approaches that could be more useful than what I already know. I plan to try test driven development in the future.

Resources:

https://www.browserstack.com/guide/what-is-test-driven-development

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

CS-448 Week 9 Be the Worst

The “Be the Worst” pattern encourages you to surround yourself with individuals who excel in their craft, even if it means being the least skilled person in the group. By doing this, you engage yourself in an environment that fosters continuous learning and growth, as it exposes individuals to new perspectives, challenges, and techniques that may not occur otherwise.

I find this pattern both interesting and thought-provoking because it challenges the traditional notion of seeking out environments where one is the most skilled or experienced. Instead, it encourages the embracement of discomfort and for individuals to seek out opportunities for improvement, even if it means initially feeling inadequate or out of place.

Embracing this pattern has caused me to reconsider how I approach my career and professional development. I have been inclined to seek out roles or teams where I felt confident in my abilities in the past, always fearing the possibility of struggling or being overshadowed by more experienced peers. However, I can see the value in seeking out environments where I am the weakest member after my reflection on this pattern. This will give me the chance to push myself to learn and grow at a faster pace, ultimately becoming a stronger and more versatile developer.

While I generally agree with the principles outlined in this pattern, I do acknowledge that it may not be suitable for everyone or in every situation. Some individuals may thrive in environments where they are the most skilled, finding comfort and confidence in their expertise. Additionally, constantly being the least skilled member of a team can be emotionally challenging and may require a certain level of resilience and self-confidence to navigate successfully.

Overall, the “Be the Worst” pattern serves as a reminder of the importance of humility, curiosity, and continuous learning in one’s professional journey. By seeking out opportunities to surround oneself with individuals who are better than them, individuals can unlock their full potential and achieve greater success in their chosen field.

4. Accurate Self-Assessment | Apprenticeship Patterns (oreilly.com)

From the blog CS@Worcester – Jason Lee Computer Science Blog by jlee3811 and used with permission of the author. All other rights reserved by the author.