This issue can be resolved by adding TestNG.class package to OnlineStore package as below
- Step 1: Build Path > Configure Build Path > Java Build Path > Select
"Project" tab
- Step 2: Click "add" button and select the project with contains the
TestNG source.
- Step 3 select TestNG.xml run as "TestNG Suite"