While Creating a test case its separately or individualy creating folder.
If this is the situation,how about for creating 1000 cases it will create 1000 folders So it is not comfortable.
Any other way to store or write all cases test in single file?
Possibly you want to have a look at Data-driven testing:
You can create an Excel file with 1000 rows of data, plus just a few Test Cases which are parameterised with data in the Excel file. You would not need to create 1000 test cases.
Hi @nnithish2504,
I am struggling to understand what it is you are trying to accomplish. Is your problem that if you create 1000 test cases, you have to run them all individually, or is it that when you create a test case it gets stored in a new folder which will cause 1000 folders to be created, each with 1 test case in it?
@kazurayam
okay what if i have all those 1000 cases are different data parameterised,In this situation i need to create 1000 Test case files ryt? So whether it is possible to write one or more test cases in a single test case file like selinum TestNG
hlo,@jmeintjesn7
okay i will make it simple i need to write one or more cases in single test case file like selinum TestNg.In selenium we use @Test annotation for defining a test case
Sorry, I don’t understand you.
No, @Test annotation is not used in Katalon.
I guess, the designer who originated Katalon Studio regarded a single Katalon Test Case (script file) to be something like a @Test
-annotated method in TestNG or JUnit.
A twist is possbile. See
You can write multiple methods in a Katalon Test Case. But you have to explicitly write
method1("Poo")
method2("Poo")
method3("Poo")
to invoke each methods you declared.
TestNG/JUnit do not need lines of method invokation like this. TestNG/JUnit will implicitly look for methods annotated with @Test
and automatically invoke them. That’s the difference.
Why Katalon does not use @Test
annotation?
I guess, the originator of Katalon wanted Katalon Studio to be useful for Non-programmers. As you know, non-programmers are scared of editing source codes using text editor. Therefore he/she wanted Katalon to be most useful in the “Manual view” where @Test
annotation does not concepually fit very well.
If you stick to @Test annotation system, I would recommend you throw KS away and go back to your favorite tools.
I have ever tried to use JUnit4 in Katalon Studio.
Using this technique, I could write a JUnit4-based Groovy class under the Include/scripts/groovy
directory with a lot of @Test
annotation, and executed that test class by invoking a Test Cases/xxxxTestRunner
. I used JUnit4 to test my Custom Keyword classes. I got a success. This works fine. However, it produces poor execution reports, which is a mere StackTrace of exception thrown, which would not satisfy you.
You might be able to develop a similar library that enable you to run TestNG in Katalon Studio. The jar of TestNG is bundled in the Katalon Studio’s distributable archive.
This approach (using JUnit and TestNG in Katalon Studio) is possible but techinically complecated. I do not recommend this approach for ordinary UI-testers unless they have good reason.
By the way, there is “TestNG/JUnit Keywords” provided by Katalon:
I haven’t tried this. So I have no comment on them.
I have never seen anyone talking about this plugin in this forum. Possibly nobody uses it.
Anyway thanks @kazurayam.
Yes i can understand but i dont need as same as like @Test annotation just i need any other similar to that.
My intension is to execute more than one test case in a same file.
I dont prefer more than one file.
whether u have any lead ? if yes let me know
I presented this.
I have no other idea.
You can have a test case and you can add these to test suites - note that a test suite isn’t a folder, it’s a way of grouping test cases. When you execute, you may execute a single test case or a test suite (or even a test suite collection). Keeping it simple though, adding one or more test cases to a test suite and executing them will result in a report being generated. Have a look through the Katalon Academy for the basics on test case creation though, it is very helpful
Not necessarily, at all…
Would you have any issue with spelling out some of those test cases’ names and parameters list?
Note that, altough this is possible as already suggested, using this approach, soon or later, you may be hit by the “Method code too large” isssue and there is no solution for it.
It’s a JVM limitation, see:
(and various other topics on this matter)
For such large use-cases, I suggest to split the implementation across few projects.
(e.g one for frontend, one for backend, one for DB validations etc … or by components / modules of your AUT, whatever is appropiate)
I don’t know why you want to write all cases in single file.
Best practices are , you do write each and every different types of validation test cases in separate testcases, so that everyone can maintained and correct failed testcases easily.