locked
Microsoft Test Manager Issue with recorded tests - auto-formatted fields causing issues, no way to get todays date or todays time when entering data? RRS feed

  • Question

  • Hi all,

    I have a Windows Forms application that I'm attempting to do automated testing using Microsoft Test Manager and everything works great except for a few questions that I have.

    1) When we have a field that gets formatted by the code, for example: A date, when you enter the field the application formats the '/  /' into the field. When you type while recording something like 12122015 the field contains 12/12/2015 when you move on because the code adds the '/'s into it; however, the automated test thinks that it needs to set the field to 12/12/2015 which causes issues when playing back because the '/' go into the field wrong because the code is adding them in too. I can get past this issue by creating a coded UI test in visual studio and taking the recording and over-writing the action with a sendkeys '12122015' instead of what it's attempting to do (setting the text to 12/12/2015) and it works;however, I'm trying to implement these recordings only in test manager. Does anyone know a way to get this to work? Is there a way to specify while recording that you want it to do a send keys?

    2) When you're entering a date and want to use a date such as today's date + x days. Is there a way to do this using parameters or anything similar? Again, I can create a CodedUI project, over-write the function that populates a date and get today's date, add one, format it to what I want, and do a sendkeys; however, I'm hoping to keep the automation only in Test Manager without creating CodedUI projects in Visual studios. Does anyone know a way to get this to work? I'd also be interested in a way to enter current time + x minutes in the case of time fields?

    Thank you for any assistance that can be provided! Look forward to hearing some creative solutions to my problems

    Tuesday, January 5, 2016 3:11 PM

Answers

  • Hi,

    Thanks for your post.

    >>I'm trying to implement these recordings only in test manager. Does anyone know a way to get this to work?

    As far as I know. I think this is not supported now in MTM.

    The only thing we can do is to convent the test which recorded in MTM to the Code UI test in Visual Studio.

    Then modify the record scripts in Visual Studio.

    So for your question. If possible you could submit this feature request:

    http://visualstudio.uservoice.com/forums/121579-visual-studio

    The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it.

    If you submit this suggestion, you might post that link here which will benefit others who has the similar issue, I will vote it.

    For the second question: “there a way to do this using parameters or anything similar?”

    Since one thread for one issue. I suggest you’d better open a new thread for the second question. Then we will follow up it.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao
    • Edited by lake Xiao Wednesday, January 6, 2016 9:11 AM
    • Proposed as answer by lake Xiao Friday, January 8, 2016 8:08 AM
    • Marked as answer by lake Xiao Friday, January 15, 2016 8:58 AM
    Wednesday, January 6, 2016 9:09 AM

All replies

  • Hi,

    Thanks for your post.

    >>I'm trying to implement these recordings only in test manager. Does anyone know a way to get this to work?

    As far as I know. I think this is not supported now in MTM.

    The only thing we can do is to convent the test which recorded in MTM to the Code UI test in Visual Studio.

    Then modify the record scripts in Visual Studio.

    So for your question. If possible you could submit this feature request:

    http://visualstudio.uservoice.com/forums/121579-visual-studio

    The Visual Studio product team is listening to user voice there. You can send your idea there so the others can vote it.

    If you submit this suggestion, you might post that link here which will benefit others who has the similar issue, I will vote it.

    For the second question: “there a way to do this using parameters or anything similar?”

    Since one thread for one issue. I suggest you’d better open a new thread for the second question. Then we will follow up it.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao
    • Edited by lake Xiao Wednesday, January 6, 2016 9:11 AM
    • Proposed as answer by lake Xiao Friday, January 8, 2016 8:08 AM
    • Marked as answer by lake Xiao Friday, January 15, 2016 8:58 AM
    Wednesday, January 6, 2016 9:09 AM
  • Greetings Lake,

    Based off of your link above, which category should we post suggestions concerning Coded UI in? I was hoping it would have its own category but that doesn't seem to be the case?

    Wednesday, January 6, 2016 1:54 PM
  • Hi DPinion76,

    You could write your suggestions in the textbox directly. And there is no need to select the category.

    Best Regards,

    Lake Xiao

    Thursday, January 7, 2016 1:51 AM