Category Archives: cs-wsu

4 Keys to Better Test Data Management

Original Article by Jeffrey Hughes

Finding proper test data for testing the software you’re developing for can be a challenge most of the time for a variety of reasons. In his article, Jeffery Hughes goes over why test data management is important and lists four main ways of how to improve your management of test data.

Hughes states that test data management is important because it can help address challenges that occur in providing test data quickly and continuously for the application you’re working on. The main three challenges that he touches on are test data compliance, availability, and freshness.

After that, Hughes addresses what the four keys to better test data management are. The first key is how to properly discover and analyze test data. Hughes states that your test data may be spread across multiple platforms and could be extremely time consuming if you tried to access it all manually. He suggests that using a tool that can make sure that the right test data is being tested and to come up with a “solution that provides complex coverage analysis and data visualization is a better approach.”

The second key that Hughes talks about is protecting sensitive data. In this section, he points out that is important make sure that sensitive data is being properly secured (even when just in testing), and to make sure that you use “inconsistent data to test for anomalies that are sure to occur with end users.”

The third key is make sure that you’re able to deliver test data on demand. Hughes points out that it is a great advantage to have your data stored on a central repository so that all test data is in one place and can be easily shared. The hope is to make sure that there are no more bottlenecks for testers that are “waiting for data” when running tests.

Finally the fourth key is to make sure that you try to automate as many steps as you can. Hughes suggests severally tools that can make automating your testing easier for your and your team. He states that this kind of “stabilized automation framework guarantees that data will be provisioned in the right state when needed by your testers.” This also makes it easier to trace your data and test cases back to their requirements, and also means that if your “requirements change, the data can be updated automatically.”

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

Google Testing Blog: Hackable Projects – Pillar 2: Debuggability

Hackable Projects – Pillar 2: Debuggability

This is a continuation of Patrik Höglund series about how to make your software hackable. (If you have not read the first article, here is the link: first article)

Patrik Höglund continues to talk about how to make your code more hackable by going on to his second pillar of hackability: Debuggability. However here this word doesn’t simple mean running a debugger on your code and calling it a day. Höglund explains debuggability as “being able to easily find what’s wrong with a piece of software, whether it’s through logs, statistics or debugger tools.” To help with this process, Höglund goes over a few examples that help their developers with debuggability.
The first one is running your project on a local host. This way you not only get around the possibility of crashing your main servers, but you can also set up “scripts that invoke the server binaries with flags.” This helps to make debugging and developing your server a simpler process overall. Höglund then goes into how to debug for mobile apps. He suggests using unit tests here as well since they have great hackability. He then gives some suggestions for software to use for debugging on iOS and Andriod. Höglund then some tips for when debugging gets tricky.
The next step that Höglund brings up is making sure that you have proper logging.He links another article to look at, but he states that you should make sure that you are getting proper stack traces instead of going off of an error message. He also says that there is such a thing as too much logging which can lead to having your project be less hackable. The other thing Höglund brings up to make sure that you can use statistics to your advantage. If you run a monitoring system, like Stackdriver for Google Cloud, Höglund says that “tools can help you keep track of request volumes and error rates.” This lets you find errors quicker and allows you to rollback bad code as soons as possible.
The last thing that Höglund talks about is System Under Test (SUT) Size. He says that “small and focused tests aid debuggability, because when a test breaks there isn’t an enormous SUT to look for errors in,” and makes tests more reliable. He refers to this article for information about SUT.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

Google Testing Blog: Hackable Projects – Pillar 1: Code Health

Hackable Projects – Pillar 1: Code Health

In this blog post, author Patrik Höglund talks about how over the years, software development can become stressful to deal with and fix constant issues. The way he suggests to resolve this issue is by making the software more “hackable”; not in the sense of making the software more vulnerable to attacks, but making it easier to modify from a developers stand point. Höglund goes on to say that a hackable project is one that includes easy development, fast builds, good and fast tests, clean code, easy running and debugging, and “one-click” rollbacks. Höglund then goes on to describe the three main pillars of hackability, which are code health, debuggability, and infrastructure.

This post focuses solely on the first pillar of hackability: Code Health.
The first thing Höglund covers are tests that you should use. He says that “unit and small integration tests are probably the best things you can do for hackability” rather than using end-to-end testing. The other thing to testing is that if you have poorly tested legacy code, the best thing to do is refactor it and add tests along the way. Even though this can become time consuming, it’s work it in the end because it leads to a more hackable system in the long run.
The next thing that should be done is to make sure that your code is readable and goes through code review. This means that there should be a reviewer who looks over the code changes to make sure that the new code is consistant with the rest of the code. The changes should also be small and coded cleanly so as to make it easy if a rollback is necessary. Another thing that will help with hackability is making sure that all of your code is submitted in a constistant format.
To reduce risks even more, you should try to consistantly have a single branch for your project. This not only decreases the possible risks, but also reduces the expense of having to run tests on multiple branches. This could possibly back fire though if, as Höglund writes, “Team A depends on a library from Team B and gets broken by Team B a lot.” Höglund suggests that “Team B might have to stabalize thier software for them to use this method and have hackable software.
The last things that Höglund focuses on for Code Heath is making sure that your code has loose coupling, testability, and ways that you can aggressively reduce technical debt.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

What Classes Should Be Tested

Testing on the Toilet: Prefer Testing Public APIs Over Implementation-Detail Classes

In this blog post by Andrew Trenk, Trenk goes over what code needs to be tested, and what doesn’t, when making a Public API. Trenk goes on to explain that if a simple piece of code has only one user or is used once in another class, you should create tests for the other class or not bother testing the simple code at all. He says that anything that is an implementation detail should not get it’s own test.
In fact if you do create tests for this implementation, it might make the code and tests harder to maintain over time, it could cause issues when trying to refactor, and it could also hide issues in your code that only show when using the API. Overall Trenk suggests testing your implementation details indirectly through your API classes. This way you see that they work with your API and you have fewer tests that will need to be updated.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

How Google Deals with “Flaky Tests”

Read the Full Article

This post, by John Micco, talks about how the Software Developers at Google deal with and minimize the damage of “Flaky Tests”. Micco defines a flaky test “as a test that exhibits both a passing and a failing result with the same code.” He goes on to state that this causes major problems because how difficult it is to find the cause of the flaky tests and the frequency of which these kinds of tests appear. There is also the issues of a flaky tests being dismissed only to find out later that it was a real failure which sometimes results in passing through broken code.

There are several strategies that the developers at Google use to minimize the damage and confusion that is caused by these flaky tests. One way is to only report a true failure if the test fails three times in a row. This, however, can be costly if the test that is being run takes a large amount of time to complete. Another way is that they implement a tool that monitors the flakiness of a test. If the tool determines that the flakiness for a test is too high, it removes the test from the critical path. The last strategy they have is to use another tool that monitors flakiness levels. When the levels change, the tool tries to find the reason for the test’s change in flakiness.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

The Pros of Platform-led Testing

Platform-led Testing by Lakshminarasimhan Rajabather

In this article, Rajabather goes over the positives of using platform-led testing to help with automation across all the stages of the software development life cycle. The first advantage that he lists for using this approach is that it cuts down on the cost and time to use assurance across the development’s life cycle. This is also positive to businesses since their goal is to minimize cost and time, and maximize quality.

Rajabather points out is that platform-led testing makes sure that the software is constantly being checked and validated at every stage of development. This is able to be done because, as previously stated, it is now possible to have software assurance constantly being implemented through the entire life cycle. Platform-led testing also works well with Agile development because it “promises quick sprints, rapid sign-offs and a measurable transfer of value from one sprint to the next.”

The last two advantages of platforms that Rajabather lists show that they are beneficial to businesses. He states that platforms allow businesses to build upon both industry and third party analytical tools which makes it so that the tools can be customized to fit a certain need. The last benefit is that platforms are not “restricted only to the requirements, design or execution stage of the lifecycle.”

Please read the full article for more information on this subject.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

Blog Introduction Post

This blog is for Worcester State University CS-443 and will be about upcoming news regarding technology and developments in the Computer Science field.

From the blog CS WSU – Techni-Cat by clamberthutchinson and used with permission of the author. All other rights reserved by the author.

5/5/16 Finished & Final Thoughts…

So when we first were introduced to the Radiology Module for OpenMRS  I was all excited.  We initially narrowed it down to an issue which looked to require minimal coding.  We were told that this issue might be ‘too difficult’, and we chose another issue, a simple task of deleting unused lines from a couple of files.  Simple, right?  Bang this out, move on to another issue.  Oh no….first getting OpenMRS and the Radiology module up and running, even for one of us, was crazy.  What that really taught me/us is that clear instructions are paramount.  This again was an issue because exactly what was to be done was vague via the ticket’s description.  Even after Matt asked for clarification multiple times, we weren’t entirely sure what the ‘right’ answer was.  Eventually we got an answer we took as concise enough to complete and actually finish the issue.  Unfortunately we do not know whether or not our fixes were accepted/utilized.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

3/18/16 Chapters 4 & 5

Chapter 4  was about having the right mental state to code well.  Distractions many of us utilize on a daily basis such as music, cell phones, t.v., or when it’s late-night and/or you’re just plain tired.  While I understand his point(s), I also understand a bit about people, and how we all function differently.  Personally I find certain sounds relaxing, or in terms of being able to produce some form of work, distracting to the peripheral portions of my thoughts and allows me to concentrate only on the task at hand.  I think even if it were possible to create a ‘perfect’ environment, that the silence itself would be a distraction to me.  I also am very much NOT a morning person, and daytime is nice, but optional, I am often up, and completely conscious at 3 AM, so I feel that again, sometimes it’s more about the fit to the person, and what achieves the mental state optimal for producing excellent code.

Chapter 5 was all about that favorite recurring theme….TDD…everything should be Test Driven Development!  I know that while this concept has been shown to my classmates and myself, that it still is not a favorite for us.  I wonder if this concept shouldn’t receive its own class earlier in our curriculum sometimes considering the seeming importance placed upon it in the later courses because a lot of us seem to, and I certainly do, feel lost with this in practice, or at least more challenged than would seem necessary.  I mean I understand the idea that you can build the code around the tests, but I feel this is not necessarily perfect.  This of course could just be my limited experience and a limitation on my current model of thinking about this concept.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.

3/3/16 The ICU and You!

So I  did the Skype for class the other day…from the ICU at UMass!  I mean, how many other people can make that kind of blog post?  “Yeah, I died the other day….and still participated in a class Skype conference!”.

Chapters 2 & 3

These chapters deal with knowing when to take on more work/responsibility, and understanding when you should not.  Luckily I have some real world experience on both sides of the fence in these regards.  Mr. Martin stresses the professionalism aspects, such as assuring you will have all of the work you’ve committed to done at the time you’ve said it would be completed by.  I am well acquainted with the fact that it is often difficult to try and tell someone, especially someone who is your supervisor/boss, “No.”, or “I can’t make that happen in that timeframe.”, etc.  I think everyone should be realistic; standards exist for good reason (usually), but people are imperfect.  Understanding our own limitations often comes from testing those limitations and reassessing based on our results, and we almost always learn more when we fail.  I understand the author’s ideas on professionalism having said that though.

From the blog halfastepoff by jrichardsoniii and used with permission of the author. All other rights reserved by the author.