471,305 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,305 software developers and data experts.

i don't know how to write the test cases in programming languages

how to apply the test cases in any of the language.tell them in breif explination and explain each of the test case
Jan 3 '20 #1
2 10739
dev7060
585 Expert 512MB
For questions that demand theoretical/descriptive answers, I always suggest the OP to go through the web for articles and content. Those can indeed explain and provide the information in a more better and detailed way. Software testing is a broad topic. Companies recruit Software Testing Engineers for this job.

how to apply the test cases in any of the language.tell them in breif explination and explain each of the test case
It all depends on many factors I would say. First, on language. Say for example, Java can handle exceptions like divide by zero. But in C, there is no concept for the same. It may crash the program while running.
Secondly, it depends on how you plan to provide and check for the test cases. Here are some ways:
- Storing the test cases in a 2D array and passing each row to the method (the one having the functionality to be tested).
e.g. int arr[2][3]={{input1, input2, result1}, {input3, input4, result}};
- Storing the test cases in a file and reading from the same.
- Testing with command line arguments. (I would write a batch script to automate the whole task).
Also there are things called as Test Automation Frameworks. Like TestNG for Java.

i don't know how to write the test cases in programming languages
Test cases can be formed keeping these points in mind:
- check for valid data type values
- check for boundary/extreme/edge case values
- passing inputs of different data type (e.g. passing a character when a float value is expected)
- check for other invalid values like special characters etc.
Jan 3 '20 #2
kaseymiddle
3 2Bits
I, too, find it incredibly difficult to understand how to write test cases, although I know that it is incredibly important in high-quality software or website creation.
Dec 5 '21 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Precious | last post: by
27 posts views Thread by Josh | last post: by
3 posts views Thread by Water Cooler v2 | last post: by
97 posts views Thread by Master Programmer | last post: by
reply views Thread by kanch | last post: by
reply views Thread by Raghunandan24 | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.