Category Archives: CS@Worcester

CS-443: Week 14

Behavior-Driven Development (BDD)

Behavior Driven development is an approach where the focus is set on the behavior of an application for the purposes of a business. This focus is to find a common ground between developers, quality assurance teams, and business professionals. Common ground is found by defining behaviors that are written in plain language, allowing everyone to understand and agree upon the software’s behavior.

BDD Process

Behavior driven development begins with defining behaviors in “feature files” which are used throughout the development process. Behaviors are straightforward statements that outline a specific process in a predetermined format.

Behaviors are written in a language called Gherkin, which use simple words such as “Given”, “When”, and “Then.” An example behavior would be, “Given the user enters an incorrect password, When they click the login button, Then they should be prompted with an error to reenter their password.” These behaviors are turned into tests with tools that check if the software behaves as intended. Because everyone is involved in this process, and agrees on the final product, confusion can be avoided.

Advantages to BDD

Behavior driven development leads to advantages that would otherwise be lost with other development approaches. A key advantage with BDD is better communication and collaboration. This is due to the nature of BDD as everyone from business, to quality assurance, to developers, meet together and plan everything. Because there is better communication, requirement understanding also increases. This is because requirements are explicitly defined, and everyone agrees what should be done. Due to the increase in requirement understanding, testers are made aware exactly what requirements should be tested. Ultimately the chances for the final product to be different than what was intended is less, saving time and effort.

Disadvantages to BDD

Because BDD is different from other development approaches, adopting the practice can be difficult. This is because teams are used to working amongst themselves, then meeting with the other teams once a final product, or an iteration of the final product has been completed. Waiting until a product has finished development before meeting the other teams can lead to wasted time and effort because what is actually delivered may be different than what the business team intended. Another reason why BDD can be hard to get used to is the overemphasis and learning curve with the tools necessary for BDD. Teams can get off track because they get caught up in learning Gherkin syntax and other tools.

Conclusion

This article was chosen because topics were easy to understand with the use of real world examples. Once past the learning curve, behavior driven development seems like a useful approach that fosters strong collaboration and communication. I was unaware of tools like Gherkin and Cucumber that are used to process the feature files, so learning about them was interesting. This approach is unlike others I have seen in the past; however, I am curious about how is all works. I will be looking into these tools in the future.

Resources:

https://www.browserstack.com/guide/what-is-bdd

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.

CS448 Software Development Capstone – Apprenticeship Patterns – “Record What You Learn”

In this blog post, I want to talk about the “Record What You Learn” pattern from the “Apprenticeship Patterns” textbook by David H. Hoover and Adewale Oshineye. The premise presented in the pattern’s introduction,

“You learn the same lessons again and again. They never seem to stick… You remember doing very similar things in the past, but the exact details escape you.”

, captures some of the feelings that I’ve been having as our development group continues our work on Thea’s Pantry. I remember doing so much backend HTTP server work last semester, but I haven’t retained the lessons as well as I wanted to, and I feel like I’m repeatedly reviewing old material.

Lately, I’ve been reflecting on how well I’ve been nourishing my writing abilities – I stopped keeping a daily journal some time ago, and I’ve noticed that I haven’t been taking as many handwritten notes in my classes as I used to. The first reason I can think of for not wanting to stick to the habit is that I haven’t been exactly clicking with the record-keeping tools that I’ve been using. At first, I wanted to keep digital personal journals with tools like Microsoft Word or a journaling app on my Android device because I liked the idea of having as much space to write as much I wanted, without having to think about reaching a physical “end of the book”. However, I’ve realized over time that there are parts of the electronic writing process, like the glow of the monitor and the distractions of other applications, that can make it harder to concentrate on personal writing as opposed to pen and paper.

I’ve also been reflecting on my writing practices in addition to the tools I’ve been using. I’ve known for some time that I would be helped by keeping records of the things I’ve learned about computers, networking, and software development in my own writing, but I just haven’t known how to start or structure a collection of notes that I want to return to and reference in the future. One solution offered by the “Record What You Learn” pattern is to utilize a personal wiki to organize and store your notes. While I’ve been thinking I want to return to pen and paper for more personal writing, I think that a digital tool like a wiki would be a great choice to organize knowledge-based writing and references to further learning resources. The review process is also an essential part of using the “Record What You Learn” pattern. The authors emphasize the importance of rereading your material: “Your notebook, blog, or wiki should be a nursery, not a graveyard—lessons should be born from this record, rather than going there to die.”

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

Test Driven Development

The last few weeks of class have all been about Test Driven Development. Test Driven Development is when you use tests in order to guide you into developing software. According to a website called martinfowler, there are three main steps that we follow repeatedly. Those steps are:

  1. “Write a test for the next bit of functionality you want to add.
  2. Write the functional code until the test passes.
  3. Refactor both new and old code to make it well structured.”

Essentially what this means is you create a list of things that you want included in your test, then you create a test for just one of those items. Once you create the test, you implement the code in order to get the test to pass. Once it passes, then you move on to creating the next test and getting that test to pass. If it causes the previous test you fail, you refractor until all of the current tests pass, then you repeat until all of the items you need are done. I personally find writing the test first to be a lot easier than writing the code first. That way, while you’re creating the code, you have an example to look back at so you know exactly what you want it to do. On top of that, focusing on one part of the code at a time makes it a little easier to develop the code without making mistakes, as you aren’t focusing on the entire program at once, just one small part at a time. According to the article, this form of development has two main benefits. It says “Most obviously it’s a way to get SelfTestingCode, since we can only write some functional code in response to making a test pass. The second benefit is that thinking about the test first forces us to think about the interface to the code first. This focus on interface and how you use a class helps us separate interface from implementation, a key element of good design that many programmers struggle with.” I chose this article as my source because I thought it did it a really good job explaining what to do step by step so you don’t get confused. On top of that, it explains the benefits and consequences of this method and how to avoid/achieve them. This article helped me further understand Test Driven Development and why it is useful.

Source: https://martinfowler.com/bliki/TestDrivenDevelopment.html

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.

Retrospective – Sprint #2

During the course of this sprint I contributed to 3 issues:

  1. Verifying GuestInfoBackend – https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfobackend/-/issues/121
    (Reviewed previous changes made to GuestInfoBackend and fixed any pipeline issues)
  2. Verifying GuestInfoAPI – https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfoapi/-/issues/150
    (Reviewed previous changes made to GuestInfoAPI and fixed any pipeline issues)
  3. Verifying GuestInfoIntegration – https://gitlab.com/LibreFoodPantry/client-solutions/theas-pantry/guestinfosystem/guestinfointegration/-/issues/24
    (Reviewed previous changes made to GuestInfoIntegration and fixed any pipeline issues)

I also assisted in reviewing tickets this time around, although to a lesser extent compared to the last sprint.

What worked well during this sprint was our ability to cooperate in finishing all our issues quite quickly. We reached 75% completion much faster than in our first sprint. Overall, this sprint seemed to pass by more quickly, despite being longer and requiring more work than our first one. I believe our previous experience contributed to making the whole sprint run much smoother. Whenever anyone needed help or had questions, we were able to work through most things as a team. Once again, our team seamlessly switched between meeting in-person and asynchronously. If anyone couldn’t attend a meeting, ample communication was provided in advance. During this sprint, most of the tickets I collaborated on involved two or more people. I believe this also contributed to the feeling of the sprint passing by quickly, as work was more evenly distributed among team members.

The only thing I can think of that we could have done better is perhaps slowing down slightly to thoroughly review our work and look for any opportunities for future enhancements. We didn’t rush the work by any means, but we did leave plenty of time toward the end of our sprint, which I feel we didn’t fully capitalize on. However, the main focus of most tickets created this sprint was on the pipelines of various components of the GuestInfoSystem, ensuring that everything was running correctly. With that in mind, if all linters were functioning properly and not returning any errors, we reviewed the changes and moved on.

As a team, I feel there isn’t much we need to improve upon. We significantly enhanced our communication and work distribution compared to last sprint, and I believe this sprint went extremely smoothly. We executed many aspects well this time around, and I don’t see a need to revise or change our working agreement at all. Overall, the sprint was not stressful in the slightest, and I was pleased with how we operated.

As an individual, I felt I could have contributed more towards achieving team success. Perhaps in the next sprint, I will take on more responsibility for reviewing issues again. I feel this way because comparing what I accomplished during our first sprint, the distribution of work was much better this time around. However, it might have been a result of everyone striving to contribute equally.

All in all, I was pleased with the outcome of our second sprint. We were exceptionally efficient, even more so than in our last sprint, and we successfully improved on the objectives we set after concluding the previous sprint. I’m eagerly anticipating how our final sprint will unfold, and I have a feeling it will be just as successful.

From the blog CS@Worcester – Eli's Corner of the Internet by Eli and used with permission of the author. All other rights reserved by the author.

The Deep End

This pattern describes growing your skills by challenging yourself with any opportunity that is given to you. Whether it’s done through taking on bigger or more complex problems or working with larger teams, there is always something to learn by trying something new. This also means seeking out projects to work on to build a portfolio and expand your skills.

For someone who started programming java in 2007, my portfolio is pretty barren. This comes down to two factors. Lost old files, and failing to start new projects. This pattern is one that I can definitely relate to the problem of feeling like I have plateaued. My eyes are opened to the truth as I get more exposure to the world of software development. If I am going to gain new skills I need to actively seek projects that push the boundaries of what I already know. I have always wanted to develop an application, but without any clear idea of what kind of application I wanted to make. This has always paralyzed me from actually learning how to develop an application. There are two clear solutions I can think of right now based off of two other patterns I have written about in the past. Following the pattern of “Find Mentors,” I could have sought out the guidance of a mentor and asked for ideas for projects that would develop my skills. The second pattern of “Breakable Toys,” gives me the option of just making an application for the sake of having a tool I can use. Making a breakable toy for an application would be a great way for me to jump into the deep end as far as pushing my knowledge of software development.

The other part of challenging myself is working with larger teams. Up until last year all of the projects I have worked on have been solo. Last semester, where I was partnered with another classmate, was one of my first exposures to developing large projects with someone else, and the challenges that come with it. Teamwork is crucial as anywhere I go in my career I will be working on a team, so being able to work together and communicate are important skills to develop. And just like learning from actually developing code, these skills will be built by actually working in larger teams.

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

Common Mistakes in Software Testing

The blog post, “The 3 Biggest Software Testing Mistakes” from Daniel Knott focused on highlighting vital mistakes that software testing groups frequently come upon in their testing strategies. I chose this blog post because as we continue to learn different software testing strategies in class I think it was important to highlight some mistakes that could be made as a tester so we can avoid these in the future. 

 The first mistake that Knott highlighted was the mistake of not asking enough questions. When you are working as a tester your first job should be to ask as many questions during the development phase of the product as possible. This will allow you to verify that the product will work as intended for the customer. These questions should be highlighting product features, limitations, etc. The second mistake is trying to automate everything. Automation if done right can be very helpful however there are scenarios where automation can do more harm than good. Knott says that many teams mistakenly aim to automate everything, often driven by those unfamiliar with automation’s true benefits. Some parts of the code that are still in development, may not be ready for automation, while other areas will require detailed quality checks that automation cannot provide. Due to this, a risk assessment and informed questioning should precede test automation while working. Once suitable areas for automation are identified, decisions on the level of automated checks should be made by the team.The third mistake in software testing is reusing the same test data repeatedly. Software testing heavily relies on data such as text, images, or voice, and system configurations. Reusing test data compromises its integrity. The system’s state or configuration may change between tests which could affect results. To effectively test an application, the development team must define and generate appropriate test data. Generating test data can be complex, depending on the system’s intricacy and technologies involved. Ideally, scripts can create test data for specific tests, allowing for deletion or reset afterward. The conclusion of the blog post has Knott describing how mistakes can be good as they are a part of growing as a software tester. The best thing we can do is to be transparent about our mistakes to allow for a culture of learning.

After reading this blog post, I believe that I am now more confident and informed about how a software tester should go about testing strategies. Being able to identify common mistakes will be beneficial so I can avoid doing those mistakes in my own work. I found it interesting the fine line between automation since it can be both beneficial and harmful depending on just what you are working on. This is why as I read it is best to be left to a team decision as automation has its own list of pros and cons.

https://shiftsync.tricentis.com/testing-strategies-methodologies-42/the-3-biggest-software-testing-mistakes-95

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.

Sprint 2 Retrospective

After finishing our second sprint I believe it went very well. Our team did a great job of communicating, time management and ensuring everyone’s ideas were heard. We also made sure to ask each other questions if we were stuck on an issue as well as ask anyone if they needed any help with their issue if they were having any problems. I believe the only problem we had was reviewing the issues, we either got a little sidetracked or were waiting on a response to a question we had about the issue so it kind of prevented the reviewer from checking on it. As a group of 5, we needed a weight total of 30, we managed to complete all of our issues. Since the last sprint, I believe we made a lot of progress as a team and managed to get through this sprint without a lot of issues.

As a team, I believe we made a lot of progress in this sprint and didn’t have a lot of issues to work on. We made sure to communicate with each other about how everyone’s progress was going on with their issue and if they needed any help with anything. The reason why we managed to get through this sprint is because of our communication and teamwork. As a team an improvement that we can make is our reviewing, we did have a couple of issues left in the needs review column that just needed to be checked but we kind of delayed that. I believe that was our only problem this sprint since for most of the issues we worked as a group and managed to get it done in one meeting. If we just made sure to stay on top of any work that needs review I feel like our sprint would’ve been done sooner than later.

As an Individual I believe I made a lot of improvements since the last sprint. I made sure that the work was even spread out between me and the team. The issues I worked on were Get the InventorySystem General test and build working and Verifying GuestInfosystem/Documentation. I made sure that the guestinfo system documentation had the right extensions, linters and that the pipelines were working. The only problem I ended up having was with the inventory system general test and build working. I just ended up asking Professor Wurst what I should do with them since by looking at other repos the general didn’t have a test or build so I just ended up disabling those pipelines and everything ran smoothly. Next sprint I plan on working on my issues and making sure that nothing sits in needs review so my team members don’t have to do more work than they need to and make sure that I’m contributing as well. I also plan on making sure to get any questions I have asked as soon as possible so that the issue can be solved sooner rather than later. 

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.

Object Oriented Testing

For this week’s blog post, I decided to discuss the article “Object-oriented Testing in Software Testing” by Mitali Varatiya. I chose this article because it compliments the object oriented testing topic in the syllabus. This article discusses what object oriented testing is, how you can develop test cases with object oriented testing, how to implement object oriented testing, different techniques with implementing object oriented testing, and challenges associated with the implementation of object oriented testing.

The author first discusses how object oriented testing can be done at multiple levels of a program, for example the algorithmic, class, cluster, and system levels. “Object Oriented testing can be performed at different levels to detect the issues. At the algorithmic level, a single module of every class should be tested. As discussed earlier, testing of classes is the main concern of the Object Oriented program. Every class gets tested as an individual entity at the class level. Generally, programmers who are creating the classes are involved in testing. Test cases for Object-Oriented Testing in Software Testing can be constructed based on the requirement specifications, programming language, and models.” The author then goes on to discuss how, at the class level, testing focuses on the integration of individual classes and their interactions with other classes in the program. “Once class-level testing is done, Cluster level testing will be performed. Cluster-level testing is the integration of individual classes. The main purpose of doing integration testing is to verify the interconnection between classes and how well they perform interclass interactions.” The author also discusses some ways in which object oriented test cases can be developed.

The author states that conventional methods of developing test cases are sufficient for creating object oriented test cases, but there are some features that may be helpful with object oriented testing that might be looked over when using more typical techniques on their own. “The following points should be considered while creating test cases for object-oriented environments. Which class is going to be tested should be mentioned properly within the test cases. What is the purpose of using particular test cases? What external pre-condition needs to be conducted while performing the test case? All the states should be specified for testing.” The author then discusses some of the challenges with implementing object oriented testing.

Some challenges that are associated with implementing object oriented testing as described by the author are the impossibility of dynamic testing, the necessity of different types of testing to be implemented to properly test the program, and the difficulties associated with the implementation of testing for inheritance in object oriented programs.

Article: https://www.scaler.com/topics/software-testing/object-oriented-testing-in-software-testing/

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.

Sprint 2 Retrospective

Introduction

As we conclude Sprint 2, it’s essential to take stock of our journey, examining both our successes and the challenges we’ve encountered along the way. This sprint, our primary focus was on scaling up productivity and initiating the UI development process. Despite its longer duration compared to the previous sprint, Sprint 2 felt back-heavy due to delays in commencing frontend work until we obtained access to the new template.

Challenges Faced and Lessons Learned

Both sprints presented us with unique challenges, contributing to our team’s growth and development. One significant challenge in Sprint 2 was the unexpected complexity encountered while coding a UI component. Initially deemed a simple task, unforeseen changes in the source code necessitated extensive adjustments, resulting in delays and frustration. However, this challenge provided valuable lessons in flexibility and adaptability. By grappling with the intricacies of the component and adapting to evolving requirements, we honed our problem-solving skills and gained a deeper understanding of UI development.

Another challenge stemmed from the weight of certain child issues, which had a more substantial impact on our workflow than initially anticipated. This highlighted the importance of thorough planning and assessment when breaking down tasks and allocating resources. Moving forward, we recognize the need for a more nuanced approach to issue prioritization to ensure each task receives the appropriate attention and resources.

Team Dynamics and Communication

Effective communication emerged as a cornerstone of our approach throughout both sprints. We found that tackling problems collectively as a group significantly eased the resolution process. Whether through online discussions or face-to-face meetings, open dialogue and transparent communication channels were maintained, ensuring alignment and informed decision-making. We intend to prioritize effective communication, proactive problem-solving, and meticulous planning in future endeavors.

Strategies for Improvement

Team Improvement

  1. Keep a consistent schedule: In hopes of avoiding a repeat of the last sprint where everything was stacked at the back of the sprint, it would be beneficial to manage our time better as a group with a more consistent meeting time.
  2. Division of Labor: We continue to ensure that one person does not get stacked with too much to do while others get left with little to work on.

Personal Improvement

  1. Frequent Check-Ins: In realizing the significance of team alignment, I commit to checking in more frequently with my team members. By maintaining regular communication and seeking feedback, I aim to ensure that our efforts remain aligned towards our common objectives throughout each sprint.

Moving Forward

As we look ahead, we are committed to leveraging the lessons learned from Sprint 2 to inform our approach in subsequent iterations. Documenting challenges, solutions, and key takeaways in a “lessons learned” repository will serve as a valuable resource for future sprints, enabling us to anticipate and mitigate potential obstacles more effectively. With a shared commitment to continuous improvement and a supportive team environment, we are confident in our ability to overcome challenges and achieve our goals collectively.

Links to Activity on GitLab

From the blog CS@Worcester – CS: Start to Finish by mrjfatal and used with permission of the author. All other rights reserved by the author.

share your knowledge

As my final Apprenticeship Pattern blog post for my capstone course, I found it fitting to write about the “Share What You Learn” pattern. The idea is fairly simple, if you are gaining knowledge on a topic, you should be able to share that knowledge with others effectively to foster mutual growth, which results in everyone building on their ‘craftsmanship,’ which further results in better products from everyone involved.

We don’t work in a vacuum by ourselves, and so communication is incredibly important. We will always be working on teams of software developers, and even in our personal projects, we are working with information that we are informed about from the entirety of the software development ‘community.’ As such, learning to communicate your ideas and share your knowledge is always great for your team.

Different people have different specializations, and in software development, we have our own specializations and interests within this field, and it is beneficial to not only contribute your expertise to the project you are working on with your team, but also share things about that expertise to get everyone on the same board with what you are doing, and perhaps foster growth in them as people and the project as a whole.

The intersting thing is that you can also learn from others’ specializations and expertise when you are sharing your own, and you can also build on your knowledge from ideas and suggestions that others may make when hearing your ideas. It’s a bounce back and forth.

I think everyone has probably experienced this to some extent, even in small circumstances. As the authors mention, simply knowing one small thing more than another person allows you the opportunity to inform that person about your piece of knowledge, and that fosters growth, no matter how small. I know that, for me, I’ve had multiple people ask me about how to do things when they need reminders or help with assignments or issues that they run into at work, and in that situation, it is beneficial to know how to communicate solutions, suggestions and feedback in a way where everyone stands to gain.

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.