How to create a test script for multiple user login?

Hi, i am trying to find a way how to execute a test script using excel file where it consist of information with multiple username and passwords.

I try to search for existing discussion, however unable to find solution to it.
Can you help to assist?

you can start by reading the docs here:

and here:

I have identifed the reason of invalid test case.
I am trying to set 3 variable to lookup from excel file.
URL, Username and Password.
However, the error of invalid test case point out that the url variable is invalid.
If i remove this url variable, i am able to save and can proceed to create test suite and map the other two variable with data in excel file

Hi bionel, Thank you for you fast respond.

I have created the excel data file and upload it in Katalon.

However, when i add in variable in the test case and click save, it prompt warning “Unable to Save Test Case. Reason - Invalid Test Case”
image

May i know what is wrong here? Before add variable in the test case, i am able to save the test case and can run successfully

Hi Bionel,

I have another test case where i want to add a variable call Company Name.
After add variable and click Save, system prompt same error as the login test case when adding URL variable.
The details of error as below:
java.lang.IllegalArgumentException: Variable Company Name is not valid qualifier.
Invalid default value of variable at index 1.

at com.kms.katalon.composer.testcase.parts.TestCaseVariablePart.validateVariables(TestCaseVariablePart.java:530)
at com.kms.katalon.composer.testcase.parts.TestCaseCompositePart.validateInput(TestCaseCompositePart.java:674)
at com.kms.katalon.composer.testcase.parts.TestCaseCompositePart.saveTestCase(TestCaseCompositePart.java:683)
at com.kms.katalon.composer.testcase.parts.TestCaseCompositePart.save(TestCaseCompositePart.java:653)
at com.kms.katalon.composer.handlers.SaveAllHandler.execute(SaveAllHandler.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:438)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:449)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:475)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at com.kms.katalon.core.application.WorkbenchApplicationStarter.start(WorkbenchApplicationStarter.java:23)
at com.kms.katalon.application.Application.runGUI(Application.java:191)
at com.kms.katalon.application.Application.start(Application.java:102)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)

Can you help to assist?

your variable name contain spaces?
seems like you name it ‘company name’
use underscores or camel casing

1 Like

Hi Bionel.

Thank you so much for your help.
It is working now! :wink: