QA Testing: What is a Test Case and How to Write it | Winston Castillo | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

QA Testing: What is a Test Case and How to Write it

teacher avatar Winston Castillo, Learning is the way

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

5 Lessons (28m)
    • 1. Intro to Class and What is a Test Case

      4:55
    • 2. What is a Test Scenario

      4:41
    • 3. Creating a Test Case

      10:45
    • 4. Types of Test Cases - Happy Path, Non-Happy Path and Edge Test Cases

      6:01
    • 5. Challenge and Conclusion

      1:32
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

154

Students

--

Projects

About This Class

Here we will discuss what is a test case, what are the elements you have to include in it and possible scenarios to test a functionality.

If you want to share this class for free, share this coupon: Free Coupon

Meet Your Teacher

Teacher Profile Image

Winston Castillo

Learning is the way

Teacher

Hello, I'm Winston. I had been teaching for different platforms and I am a QA expert and also a developer.

Please take the chance to review and learn with me

See full profile

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Intro to Class and What is a Test Case: Welcome to another of my classes. I am happy to see you again in one of my videos. I got good news for you. If you are one of my students, I want to tell you, I am recording these classes again based on your comments and suggestions. So I hope you can enjoy these new class. This class is divided into sections. I decided to do these different line. We drew the previous class that I real record. And it is regards to I decide to include the theory and the guided activity in just one sub-shell. If you want to do the challenge, I highly recommend you to see the whole BD. So stay with me and let's start with these amazing class with our class today. So what we're going to discuss in this class? Well, we are going to discuss what is a test case, how to write a good test case. The defendant between test the scenario on a test case and what are the types of these cases? After this class, you will know what are the elements you have to include. Test case, how to analyze a so for food shop ID, what he suspected result and the different with the actual result. But it's importance of these kind of documentation. So, well, let's start talking about something about the beam average of Missouri. A good development team is always looking for better ways to deliver quality. They honor sheep, the quantity, as well as they own code. Most of the time. They try to cover all the possible scenarios, thinking about what happens under circumstances and what happened under others. There are different techniques to develop software and of course, methodologies. In the beginning the t is usually a word with predictive techniques, but nowadays, the majority of the team worked with a child that no largest. And according to the manifesto, they prioritize working software over comprehensive documentation. It doesn't mean there is not documentation at all, but it will cease if it is necessary and provide vowel. So yeah, we need to document how do users so forth. So that all the documentation we created is because there is some boundary need, not only to the user but to the team. And yes, you guessed it. A test case is a way to provide further information of our functionality with details that are not included in any other search must be urea we created in the process of developing frame, such as user story or a sentence criteria, they should cover those as an adult, I know nobody else has thought of before you. So at this point, you play a very important role in the team, so enjoyed it. Test cases, as you see in this slide, are documents that provide the steps to achieve a certain result that are simple. And you can create the end with any editor program such as Word or a Google spreadsheet. Remember that at this case is not an acceptance criteria, but it will determine a lot of development process because it will include things that are not specified there. And what is that, this case let's explain it. Test case is a test is a script. Yes, as creep, simple. Just like that, is a script which includes at set of options to verify that particular feature or functionality of your software application. The elements included in that test case, we can elaborate them because they are simple. You have to include preconditions. Title of the test case, test data, steps, sped the results, post-conditions. And of course, that will create a wonderful test case. The test case include a specific bubble of conditions to using which are testing engineer can compare expected and actual results to determine whether a software products, it's functioning as per the requirements. 2. What is a Test Scenario: The test cases are available files to the rest of the team and also the surge to future state steps. So this case should be accurate. And what I mean, It means the surest press that sat porpoise. The other thing, they should be economical, not unnecessary steps or words. If you created with a love of Word, you can confuse of your team. So please be economical. Three possible capable of being traced to requirements. If you compare them with our requirement, they should be transferable, repeatable. And what I mean with this means that if Europeans then you are going to have always the same result. You can be used to perform the test over and over. It means you can do that over and over and over. And you will have always the same result. And also they should be reusable. Because if you need to, if they need to be DOM by another person in the team, the team, or if you want to modify some things, they should be reusable. Does the reason that's the reason you should provide simple language in your document. All the test cases have a goal and that's the reason we follow this crease. To prove, if you follow it, you will not catch any malfunction in the system. And all of those will be performed successfully. In case you find an issue performing, then you had to rise above report. I had AP class about reporting about in the discretion of the video. However, it is important to set a goal also for your test case, but the goal is not expected result. We will talk about that later in this video. So if you catch a malformed shown, you catch above. So now it's time to do a simple as its size. Why I want to talk about what is a test value? And for that, I need you to sink. You had to review the search food seasonality in the homepage at google.com, and you have different options to follow. Let's think that you are here in the Google page, website and you see, and they ask you to verify the search functionality. First, just guessing you have in the interface bar when you can't type a word, you had the bottom goals search and feeling lucky bottom too. So yeah, you have to review it. You had to review the function melody at google.com and you have different options to follow. Let's enumerate some of them. Okay, That's part of the play. The first scenario that you have is what happened when you type a word or sentence and you click on a search. On Google search. You may be had another scenario, like what happened when you type a word or sentence and click on, I'm feeling lucky. What happened when you click on that button? And the theorist nano is what happened when you don't type any sin and click on Google search. So you see those are scenarios. They are not test cases, but they are essentially areas that you can use to create your scenarios. So all of them are not Nassim but sewage material to create your test cases. So this is what we call test scenarios, are the different paths that you can take when you are testing a financial malaria. But the test scenarios are bay and cover a wide range of possibility. But remember testing, as I told you before, it's all about being buried a specific test cases bring detail information to the person who reads it and dated the scenario, and elaborate deceptions to provide precise data. 3. Creating a Test Case: So let's sync. We are going to create a test case with some of the SNR is we have got in the sample, okay? So for its start, we should understand what are the things we will include in the test case. For ethane, again, is preconditions, damn title of the test case. Test data, steps, spectra, results, and post-conditions. We will elaborate on any of them. Okay. So in all your test cases, I think I didn't include here. But in all of your test cases, you have to provide the author of the test case. In case I were the person grading this test case. I will show feel fill out with my name. It will be easier if someone has a question about the documentary. If Descartes doubts about the document, they can send directly to meet them as such, because that information is also provided in the document, right. So remember, you also have to include in your test case the author k. In this case, I am the author. So we install Castillo should be in order. It in the other line. Okay? So yeah, you have also to include the author. Now, returning to our example, okay? The first thing we have to do is the preconditions. What are the preconditions? Imagine you are going to test the search functionality, but you don't have any browser installed on your computer or our Internet connection, there is no chance to complete the testing or to verify the funtion RED. The precondition section in your test case specify the programs and environments you had to sit on your computer to start testing. So in this case will be something like to have a browser installed on your computer and an Internet connection. So you put that in the document or UK write that in the document. Nets the title of the test case. We need to add at this point at title for this test case, it could be something that provides an idea of what is the kind of process we will perform. After following the steps we will include. We will include later something like d, c 000 001, searching for a sentence in the Google homepage, feel. That could be enough. In my personal experience, adding a number, cool, help you to group and categorize the test case you create. But there is not any rule you had to stick to when you are creating the title. So what is my goal with the test cases? Not older TEN tests did search functionality bottom is giving bad results related to the sentence I grad in in the. So what is my goal with this test case, not older than test the search functionality bottom is giving back results related to the sentence, I grad in this search field firm. So you had to grad also your goal for the test case. Another thing I would like to include in this presentation in the test data, to check the functionality, we aren't going to need the world's centers we are going to use to search on the internet. This is what we call test data. It is kind of easy to identify the inputs in our scenario, but sometimes it's not. So determining test data can be time-consuming. And because of this, sometimes it could be useful to document also this information in your test case. In our case could be the worst. We are going to look for a blood test cases, test planning. This is tragedy, whatever the word that job in your mind. But because we are testing the search functionality in Google. Correct. So providing these direct could be easier, but again, it could be time-consuming in other kind of test cases. Nets. And for me it's the most important part of your test case are the steps. So to create a stats, what you have to do is to think of all the options you had to do to search a sentence in Google. Let's enumerate them. Step 1, open the browser. A step to type in the address bar, www dot w dot google.com. Step 3. Step 3, way until the website is loaded. Step 4, click on the text field. A step file, type a sentence. And thus the reason you include the test data, you are not hardcoding light type AB test case sentence or types of IDs you just mentioned, type a sentence. And if the person who is running this test case, they don't have the idea of what since its citizens you are talking about ego directly to the test data. Okay? So in this case I can write something like type a sentence because I provide the test data. And finally the step set. And finally, the step sits. Click on Search. Boredom. And I seen that soul, you have it. These are all the steps that you have to follow to perform this test case. Voila, we have searched for a centres in Google. We call this part in our test case, test the steps. And they provide clear guidance to everyone in the term. And they provide clear guidance to everyone in the team to be able to perform your test case. Now we shall move to the next thing you have to bear in mind each time you are creating a test case. And why is that thing? As you probably know, after you probably know, the applications and systems are programming to give you at debtor may not answer. Once you add, for example, if you click on Search button, once you add, for example, if you plead on Google Search button, the next thing you are waiting to see is a new window with a list of results which include your sentence in each option. We call the results expected results. As acuity engineer, you have to be aware of what are the results you will receive after you follow a series of steps before you start writing. That is case. You can get this information from the requirements, acceptance criteria, meetings, or any other search of information. The programming answers for the different SNR is are the sped the results we check with the test cases. They are aligned with the way the functionality was thought at the beginning. So returning to data sample, the spectrum result could be something like you should be redirected to a new page without list of results that include the words you type in the sentence. So yeah, that's all. If you are able to grow these kind of information in an acumen you created at this case. So if the actual result so if the actual result is equal to the spectral resolve, then your test case pass. Otherwise, if it's not, it fails and it is time to write a report to them. And it is time to write a report to the rest of the team and talk about how to report a bug in another class. So go to the, so go to the description and you can find it there. Finally, something is also need to include the post-condition power. Finally, something. Finally, sometimes is also needed to include the post-condition part. For example, if we would like to mark as favorite the result of the lease, we should perform on a series of steps. But at the end, we shall have a stored in the list of favorites, the result of the list. No matter if we decide to close the browser. No matter if we decide to close about, no matter if we decide to close the browser, the web site shouldn't be a store per month. Three, it is a post-condition is scenario because it produces a change in the system and vitamin. So that's a post-condition store the results in a book, max. So let's review what we had talked so far. Usual, stick to this suggestion to create a good test case. So. 4. Types of Test Cases - Happy Path, Non-Happy Path and Edge Test Cases: Why did she will have in mind to granddad test case? Well, as far as possible. Right, these cases in such a way that data is all new, as far as possible. Write test cases in such a way that JU tests only one thing at a time. Do not overlap or complicate this case is because remember, you should receive a specific answer after you perform the steps in the document. There should not be a possibility that following the step, you receive a different answer each time you follow the steps, each time you run them, okay? Another thing, they are grided in simple and easy to understand language. Do you have to use active voice instead of passive voice, for example, grad in your test cases, do this thing or do that, okay? And finally, use names of four fields. What ever is in your user interface or in the system you are testing, use a SAT names. Maybe a person who doesn't know so much about your system, that person should be, should be able to run your test case because you use it sat and specific names for all the elements in the user interface. If you stick to these suggestions, you will be able to create good and useful task is doc comments. Another thing that I would like to talk in this class is the, another thing that I want to talk about is the types of test cases. So why are the type of test cases? We had type of test cases that could be positive or happy path, negative t, or nanny happy paths and edge cases. Let's elaborate each one with a simple example about our login functionality. So let's go for the scenarios. We will talk about. A positive. A positive test case usually ensures that users can perform appropriate options when you seem valid data. For example, check response on edX during valid name and password in a login screen. Okay. With valid username and password, usually be able to lock in the screen, correct. So that's what we call positive test case. Let's go for another resonance. And that's what we call a negative test case because is performing. And that's what we call a negative test case because is performed to try to break the software by performing in ballot or on a table options or by using embodied data. For example, when you check respond on enter in a username and a password that is not a star in the system. You should be able to log in in the, in the application. So this S scenario will produce a negative test case. That's what we call a negative test case. Also to check the respond when username and password are empties last, also a negative test case because if you click the login button, you should receive an error message. Me as such, why you had to put a yield a valid username or at least something in the username field and in the password field. So that's what we call negative test case. And finally, we had the last one and that last one type of test case. I'm going to try to spring, spring. In this way. Try to imagine what happened if the password should be a specific strain that show include at least one capital letter, one number, one special character. And the string should be more than a and less than 15 characters. So you should see that. So you should see that in at least a test with seven characters, another with 16 characters, and another following the rules. Those test cases or test cases because you are trying to test ranges gate and the specific things that they funtion library is asking you. So that's what we call H test cases because somehow they are mincut. So at this point you have a non-information to start creating your own test cases and to solve that challenge in the next section. So go ahead and good luck. 5. Challenge and Conclusion: So I had a challenge for you. The team is going to include a new functionality in the bank website to provide the user is 30 cultural conceptions. So as a register user and client of the bank, I want to add says My story calls so that I login and click on the bottom too, had the report. So can you sing in how many is in this case, can you create from that statement? These download the cheap and create as many test cases and you can follow in the model, including all the elements at this case she will have. And your answers to these class. We have reached the end of the class. I hope you enjoy it yet. But, you know, if you want to share this class with someone else, you can go to their excretion and you will have some free coupons to buy one of your friends, colleagues to see this class. Also, I will highly appreciate if you take the time to review this class and let me know your comments and suggestions. If you feel there is something that I can improve, I really need your feedback degree a bear their classes in the future. So thank you very much for investing the time to see this class. And I see you in the next class.