Forum Discussion

saurabhsharma09's avatar
saurabhsharma09
Contributor
12 years ago

Test Case Pass Individually but fails when run in Test Suite

Hello,

I have a Test Suite with 2 test cases as below:-
1. Database Cleanup(Deletes entries from database)
2. Application Login
Application login test case has Test Steps as below:-
1. DataSource Step(Excel data Source to get username and password)
2. REST Step(api call to Generate CAS-Ticket using username and password from DataSource Step)
3. Groovy Step(Extract CAS-Ticket from REST Step response)
4. Property Transfer(Save CAS-Ticket to Project level property)

The problem i am facing is that Application Login Test Case always fails when I run the Test Suite However when I run this test case Individually
then it passes without any problem
Both the Database Cleanup and Application Login Test Cases are independent of each other and are running in sequential order.

Could you please help me to get this resolved?

Regards,
Saurabh

5 Replies

  • Hi Saurabh,
    What is the error message when it fails? Is it some assertion failure or an error in execution?

    Best Regards,
    Prakash
    SmartBear Sweden
  • Hi Prakash,

    Please refer attached screenshot for reference.
    No.It's not assertion error, the response itself is not good.

    Regards,
    Saurabh
  • Hi,

    You receive the assertion error because the request fails and you get bad credential error. So the XPATH set in assertion doesn't exist so you receive an error on assertion. The authentication fails in the request due to bad credentials.

    Does the Database Cleanup(Deletes entries from database) testcase affect the DataSource Step(Excel data Source to get username and password)? in the other testcase.

    It might be deleting the rows in the datasource or may be indirectly affecting? Do you have any scripts setup?

    Let us know if this helps? Else log a ticket on the support form, attach the project(Right click on the project > Export project)

    Thanks,
    Jeshtha
  • Hi,

    My bad.Yes this is assertion error.
    however the database cleanup step does not depends upon any test step and it's not modifying Data Source values also.
    I have tried following also :-
    1. Put a Groovy Step as Database Cleanup Instead of my existing Database Cleanup which uses JDBC Step and Data Source Loop to do so.
    2. Do Cleanup from Setup Step at Test Case Level and closed db connection in Tear Down Step.
    3. Do Cleanup from Setup Step at Test Suite Case Level and closed db connection in Tear Down Step.
    4. Put hard coded username and password values in the Application Step Instead of taking these values from Excel data source.
    But still no success.
    and regarding raising the ticket i can't share the project due to confidentiality reasons.
    Is there any other way to solve this?
    I am stuck up on this Issue.

    Regards,
    Saurabh
  • Hi,

    For the database cleanup step, Can you explain how are you doing it?

    Also, do you see any errors on soapui or error log tab at the bottom?

    Regards,
    Shadid
    SmartBear Sweden.