locked
Web perforamnce test - Checkout with credit card RRS feed

  • Question

  • I have recorded the below web performance test

    1)launch

    2)login

    3)search and add items to cart

    4)checkout

    5)add shipping address

    6)add billing address

    7)click continue

    8)Add payment information (credit card type, number, expiration date)

    9) Click submit order

    order will be created

    10)Logout

    While recoding this test looks good . but if I playback the test fail at the step 8. Because it is trying to enter the same credit card information and it validates and throws error as "This credit card already existed and you can select from existed card box"  and the order is not created. We don't have more credit cards we need to use the same for multiple users. How could we handle this after recording. Can any one please help me.

    Wednesday, September 19, 2012 3:05 PM

Answers

  • SPQA,

    You need to work with the team developing the system under test to obtain more test credit card data, or bypass the credit card processing altogether. There is nothing that visual studio can do to solve this, its not a tool problem.

    Some Suggestions:

      • Obtain more test card numbers that are valid for testing, and will allow it to go through front end validation, but then silently fail behind the scenes.
      • Modify the application your testing to accept a special card sequence, so that it will not process any card data with that sequence, or silently fails.
      • Modify the application to stub out the actual credit card processing and bypass validation of the card sequences, so no card number need be provided.
      • Some combination of the above.

    http://blogs.msdn.com/rogeorge

    Thursday, September 20, 2012 4:41 PM

All replies

  • Sounds tricky, you could have some form of post request plug-in to remove the database entry of the credit card (or wherever it's stored) so it's allowed to be re-entered. The problem with this is guaranteeing that 2 users don't cross each other's path in submitting at the same time or you'll still run into the same error.

    Surely if this is for a test environment you don't need genuine credit card details so you should be able to use a datasource with unique access and then the users won't confilct with one another.


    Nick Sandel (Software Tester) New to C# since November 2011

    Wednesday, September 19, 2012 4:02 PM
  • Hello SPQA,

    Thank you for posting in the MSDN forum.

    I agree with Nick’s suggestion. You can add a data source including more credit cards to the step 8 request, bind data in a database for any input field. Then you can set the access method to Unique to make sure each user get a unique credit card to check if it helps.

    Also I think you can remove your validation for credit card to allow the same credit card information.

    For more information about binding a data source to a web performance request, you can refer this article: Binding a Data Source to a Web Performance Test

    I hope it can help you.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, September 20, 2012 6:24 AM
    Moderator
  • Is there any other way because we don't have many test credit cards data and we need to run on millions of user load. We need to exexute our test is with the existing and also with new credit card

    Thank you for your help

    Thursday, September 20, 2012 3:36 PM
  • SPQA,

    You need to work with the team developing the system under test to obtain more test credit card data, or bypass the credit card processing altogether. There is nothing that visual studio can do to solve this, its not a tool problem.

    Some Suggestions:

      • Obtain more test card numbers that are valid for testing, and will allow it to go through front end validation, but then silently fail behind the scenes.
      • Modify the application your testing to accept a special card sequence, so that it will not process any card data with that sequence, or silently fails.
      • Modify the application to stub out the actual credit card processing and bypass validation of the card sequences, so no card number need be provided.
      • Some combination of the above.

    http://blogs.msdn.com/rogeorge

    Thursday, September 20, 2012 4:41 PM
  • I  tried below way. But I am not sure is this the correct way or not.

    I Recorded test1 for the existing credit card scenario

    I put a if condition to verify there is any existing credit card. If it is run the steps of payment requests in the test1.

    Later I copied payment requests from another test2(new credit card) into this test1 and added if condition to verify to enter new cedit card if there is no exising credit card for this user

    But some how my test is not working. It may be because the view state is different as I copied some of the requests from other test2. into test1. Do you think is this the correct way? If it is how to handle the requests copied from other test to the current test.



    • Edited by SPQA Friday, September 21, 2012 7:03 PM
    Friday, September 21, 2012 3:19 PM
  • Hello SPQA,

    Later I copied payment requests from another test2(new credit card) into this test1 and added if condition to verify to enter new cedit card if there is no exising credit card for this user

    Maybe some unexpected problems will occur if you copy a request from one test to another test.

    In order to avoid some problems, you can right click the web test name to add recording or right click a request to insert recording instead of copy a request to the target test.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us


    Monday, September 24, 2012 7:30 AM
    Moderator
  • Hello SPQA,

    I will mark Regeorge's reply as answer, if you find it no help, you can feel free to unmark it.

    Thanks,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, September 25, 2012 10:16 AM
    Moderator
  • Hi Amanda,

    Can you explain what kind of unexpected problems I see when I copy the requests from another test.

    Thanks

    Tuesday, September 25, 2012 3:50 PM