Data Provider public static java.lang.Object[][] com.smiota.test.ui.common.utils.TestDataProvider.urbanappstandardonlynewflowlogin() returned a null value

44 views
Skip to first unread message

Shreesh Kallihal

unread,
Jan 22, 2024, 3:19:27 AMJan 22
to testng-users
i recently changed few environmental varibales i dont remember what did i do but im getting this error for all the testsuites

⇜Krishnan Mahadevan⇝

unread,
Jan 22, 2024, 3:40:44 AMJan 22
to testng...@googlegroups.com
Hard to say what is going wrong. How about you include some additional context around the following:

* TestNG Version being used
* Sample code that can be used to reproduce the problem ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Mon, Jan 22, 2024 at 1:49 PM Shreesh Kallihal <shree...@gmail.com> wrote:
i recently changed few environmental varibales i dont remember what did i do but im getting this error for all the testsuites

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/76bdc48c-b21b-4d97-a9ac-516a7cfb7cefn%40googlegroups.com.

Shreesh Kallihal

unread,
Jan 22, 2024, 4:47:31 AMJan 22
to testng-users
sure, 


@Test(enabled = true, dataProvider = "urbanappstandardflowbothexistingandnewlogin", dataProviderClass = TestDataProvider.class, groups = {

"mobile", "sanity", "integ" }, retryAnalyzer = UrbanAppStandardFlowAdminActions.class, priority = 1)

public void CourierDepositBoth_singlePackageDeposit_Standard(String userName, String password, String adminUserName, String adminPassword,

String iemail, String igmailCredFile, String webAppUsername, String webAppPassword) throws Exception {


try {

String lockerType;

String lockerSize;

String lockerNo;

String packageType;

String ReceipentName = receipentName1;

initializeBothApps(userName, password, adminUserName, adminPassword,iemail, igmailCredFile, webAppUsername, webAppPassword);

objUrbanAppScreen.loginWebAppScreen(webAppHelper, API_URL_Connect, webAppUsername, webAppPassword);

objUrbanMainScreen.releaseAllPackagesUsingAPI(webAppHelper, androidLockerAppHelper,

Locker_DEV_NAME, lockerAppPackageName, Locker_APP_NAME, lockerAppActivityName,

APPIUM_PORT2, sysPort2,

ReleaseStatusID, JSONFilterSyntax, false, false);

objUrbanAppLoginScreen.helper.driver.pressKeyCode(AndroidKeyCode.BACK);

logger.info("checking for the ");

if (objUrbanAppLoginScreen.helper.driver.getPageSource()

.contains("com.smiota.smartlocker:id/RainViewID")) {

objUrbanAppLoginScreen.helper.findElementById("com.smiota.smartlocker:id/RainViewID")

.click();

}

//click courier

waitUntilElementUrban("com.smiota.smartlocker:id/depositPackageBtn");

objUrbanAppLoginScreen.helper.findElementById("com.smiota.smartlocker:id/depositPackageBtn")

.click();

boolean containsNotification = false;

for (int i = 0; i <= toastWaitTimeCounter; i++) {

String sourceXml = objUrbanAppLoginScreen.helper.driver.getPageSource();

logger.info("Checking for Notification");

objUrbanAppLoginScreen.helper.waitSimply(1);

if (sourceXml.contains("Received 1 packages")) {

containsNotification = true;

logger.info("Notification Found");

break;

}

}


logger.info("Assert notifications received");

Assert.assertEquals(containsNotification, true);

logger.info("Done with deposit");

} catch (Exception ex) {


logger.info("Exception occured with message :-" + ex.getMessage() + " stack trace :- " + ex.getStackTrace()

+ "Exception string " + ex.toString());


System.out.println("Started Login" + userName + password);

clearbothApps();

Assert.fail(ex.getMessage());


}

}


error is :

FAILED: CourierDepositboth_singlePackageTapXonCloseLockerPage

org.testng.TestNGException:

Data Provider public static java.lang.Object[][] com.smiota.test.ui.common.utils.TestDataProvider.urbanappstandardflowbothexistingandnewlogin() returned a null value

at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:148)

at org.testng.internal.Parameters.handleParameters(Parameters.java:820)

at org.testng.internal.Parameters.handleParameters(Parameters.java:762)

at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:60)

at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:39)

at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:771)

at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)

at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)

at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)

at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

at org.testng.TestRunner.privateRun(TestRunner.java:770)

at org.testng.TestRunner.run(TestRunner.java:591)

at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)

at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)

at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)

at org.testng.SuiteRunner.run(SuiteRunner.java:304)

at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)

at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)

at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)

at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)

at org.testng.TestNG.runSuites(TestNG.java:1032)

at org.testng.TestNG.run(TestNG.java:1000)

at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)

at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)

at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

here urbanappstandardflowbothexistingandnewlogin is a csv file containing data of 0,1 and detected TestNG version 7.0.0

Krishnan Mahadevan

unread,
Jan 22, 2024, 5:53:55 AMJan 22
to testng...@googlegroups.com
I cannot run this sample to reproduce the problem. 

Please help share a simple standalone example that can be used to recreate the problem. 

Also please mention what version of TestNG you are using. 

7.5.1 is the latest version with jdk8 compliance and 7.9.0 is the latest version with jdk11 compliance. 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

From: testng...@googlegroups.com <testng...@googlegroups.com> on behalf of Shreesh Kallihal <shree...@gmail.com>
Sent: Monday, January 22, 2024 3:17:31 PM
To: testng-users <testng...@googlegroups.com>
Subject: Re: [testng-users] Data Provider public static java.lang.Object[][] com.smiota.test.ui.common.utils.TestDataProvider.urbanappstandardonlynewflowlogin() returned a null value
 
Reply all
Reply to author
Forward
0 new messages