Found 3 repositories(showing 3)
jepso-ci
Download debugging information about a sauce labs job
sauceaaron
Show how to get capabilities and session ID to see sauce labs results
ArvindSabina
Software testing will save your life and makes for a delicious seven layer dip Picture this: you’ve just written thousands of lines of code, you’ve gotten your application running smoothly, and you’ve fulfilled all the requirements you set out to complete. You’ve even effectively communicated what your code is doing with comments so detailed even your parents could understand them. C’est magnifique! Time to ship it, right? Wouldn’t that be nice? Alas, just let me crush your dreams real quick. The Importance of Software Testing Now, imagine this scenario: you’ve shipped your code and it’s being used daily by thousands, nay millions, of delighted customers. These new features you built? They love them! Just look at them froth at the mouth with excitement as they scroll, click, consume. But, wait! Something goes awry. Every time a customer accesses a file of a certain size the application freezes — only for a moment, only for long enough to be slightly annoyed. “Practically imperceptible; no one will care,” you think. “What’s that?” When a different file is accessed by more than 500 people in an hour, it breaks entirely? Is it hot in here, or is it just me? Can someone open a window? Are we trying to heat the whole neighborhood? Where did everybody go? Gradually, your customers stop scrolling, stop clicking, stop consuming. You lose your job, your dog runs away, and your cats continue to plot your demise, only with more vigor and determination. And it all could have been prevented if only you had been proactive about preventing possible problems. Tsk, tsk, what a shame. Come back, Barkie Mark and the Fluffy Bunch. I miss you. Relax, it was only a nightmare. You know all good software should be tested. You know how to ensure guaranteed functionality in the areas of your software that will have the biggest impact on the user. And I know you know the various kind of testing that work together to prevent total, catastrophic destruction and heartbreak. If this is the case, no need to read further. But if you want a bit of a review… take a peek. No one will know. I promise. Level 1: Unit/Component Testing Test this part, then this part, then this part, then this part, not that part, just kidding, that part too. Unit Testing is the process of validating that each individual component of the software performs as expected. As the smallest, most precise level of software testing, unit testing focuses on very few inputs and typically one output, and the tests are often created before writing any lines of program-specific code. Test, code, test, code, test until the end of time. Each program, function, method, etc must pass before components are viable to be integrated together. This process allows engineers to quickly catch any bugs at the cellular level, the smallest component of the system, before combining units into a more complex, fully-integrated composition, makes debugging quick and easy, and creates more reliable code. Usually performed by the software developers responsible for its development, unit testing makes use of a method called White-Box testing (see below). Think of it this way, if you poke each unit of your program, it’s pretty easy to see where it collapses. As an analogy, let’s say you’re making seven layer dip for a Super Bowl Party because why not and it’s a delicious blend of metaphorically useful ingredients. You purchase the refried beans, the guacamole, the sour cream, the salsa, the cheese, the green onions, and the tomatoes. Naturally, you’re going to test each individual layer of your magnificent dip before assembling it together into a delicious treat. You need to assure the quality of the ingredients, after all. Same goes for unit testing. Level 2: Integration Testing Relationships can be hard. Working together is not always seamless. Are your zodiac signs even compatible? It doesn’t look promising. Integration testing ensures that, though each component of the system works flawlessly on its own, they will intermingle without any hiccups, too. At two levels — component integration testing and system integration testing — this process is meant to uncover the defects that result from the co-mingling of two or more units. Does the cheese blend nicely with the refried beans? Do the guacamole and sour cream effectively cool down the salsa’s mouth-watering heat? Do the onions and tomatoes balance out the dish by adding some substance and texture? Does each ingredient work with the next to compose a symphony of flavors on the edge of a chip? If so, those units are integrated! Level 3: System Testing The software is integrated and ready for production. Well, once you’ve made sure you’ve met all of the requirements specified, that is. When you feel like you have, independent testers are usually involved to confirm. Basically, does that seven layer dip have the correct seven layers and taste like it should? You didn’t substitute sour cream for whip cream or salsa for marinara sauce, did you? If you did, you should probably throw it in the trash, but you may be able to save your source code yet. Go refactor and come back with the correct ingredients. Level 4: Acceptance/User Acceptance Testing Is the system acceptable? Similar to System Testing, acceptance testing measures whether or not the software meets business requirements and is ready for delivery. Once the different, individual units of the system are ready to be integrated (Unit Testing), the resulting integrated product passes its own tests (Integration Testing), and satisfies requirements (System Testing), we perform acceptance testing to determine if the final composition is ready to be made available to its users. Typically, a combination of internal — Product Management, Sales, Customer Support, etc — and external testers — Customers for whom the software was built, end users, etc — will use black-box testing in this stage. Assuming your designated taste-tester keeps diving in to that dip, you are good to go, friend. Give the people what they want! Method 1: Black-Box Testing I put something in; I get something out. Black-box testing is mainly concerned with ensuring your inputs are producing the desired outputs, without paying too much attention to how those outputs are derived. As one of the most common testing practices, it is basically your highest level view of whether or not the application is functioning as expected. Black-box testing is great for simplifying the testing process because it can be done by non-technical users, but it lacks the precision required to identify why errors are popping up. Essentially, “I know this thing is broken, but I’m not sure why or how to fix it.” Perhaps, a great place to start but your task is far from done. Method 2: White-Box Testing Perhaps you could have riddle out that white-box testing is a bit like the counterpart to black-box testing. It requires a deeper understanding of the underlying software in order to test for specific scenarios that the source code will handle in different ways. When you understand how the code should respond to user engagement, you can design tests that, well, test all of these interactions. If the software is designed to use specific sections of code for specific inputs, you can create tests that target each of these sections and ensure they are working properly. While a technical understanding of the software, and perhaps access to it, is required, white-box testing is more efficient at identifying which areas of the code are responsible for bugs and makes optimization that much easier. For now, I will not be getting in to Grey-Box Testing, but you can imagine it is a combination of the previous two monotones. So, while I’ve provided you with an overview of software testing, as well as an abundance of gifs, in this post, there is far more that I did not cover involving variations on the levels and methods of testing above. Keep an eye out for a more technical dive into test-driven development and how to actually implement it.
All 3 repositories loaded