locked
Export test results when calling the test method outside the CodedUI Test RRS feed

  • Question

  • I am developing an application to run the automated test. I created 2 projects. The first project is the test project using CUIT. The second project is a windows form application allow users to upload the test case and run the tests in the first project. In this case, how can I access the .trx file? Because when I open the test results folder, there is no .trx file there

    Best regards,

    Tu.

    Friday, October 5, 2012 5:28 AM

Answers

All replies

  • Hi Tu,

    Thank you for posting in the MSDN forum.

    Just to make this issue clearly, which VS version are you using?

    If you use the VS2010, you could run your coded UI test in the Test View window, and then you could get the test result in the Test Results Window, it is saved to the “TestResults” folder of your Test project in default.

    If you are using the VS2012, if we want to get the .trx file, we could run the test in the command line.

    http://social.msdn.microsoft.com/Forums/mr-IN/vsautotest/thread/0994eec3-55bd-4a82-9c4c-22a445834a2a

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Monday, October 8, 2012 6:45 AM
    Moderator
  • Hi Tu, where are you checking for the trx file?, if you run the tests from another application(not from the test view) then the results will be created under the same directory as your application, try to check under the debug folder of your windows form application the results should be there.
    Monday, October 8, 2012 1:14 PM
  • Hi EtharMahmoud,

    Thanks for your answer.

    I opened the debug folder, I only saw the results of the tests that I ran in the past, but I can not see the results of the recent tests ( last week and today). Do you know why I can not see them?

    Thank you.

    Regards,

    Tu.

    Monday, October 8, 2012 10:13 PM
  • Thanks for EtharMahmoud’s help.

    Hi Tu,

    Sorry for my misunderstanding about this issue.

    I opened the debug folder, I only saw the results of the tests that I ran in the past

    Do you mean that it work well before? If so, did you change anything?

    I can not see the results of the recent tests ( last week and today).

    If possible, I suggest you move the previous test results to another folder, and then Clean and Rebuild your app, and then run this app again. In addition, we would make sure that the test could run.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us


    Tuesday, October 9, 2012 1:55 AM
    Moderator
  • Hi Jack,

    Thanks for your answer.

    I tried to create a new project but it is still the same problem that I can not see the Test Results and I also can not see the folder Test Results in the debug folder.

    Best Regards,

    Tu.

    Tuesday, October 9, 2012 2:37 AM
  • Hi Tu,

    Glad to receive your reply.

    As my previous reply, we need to make this issue clearly.

      • Does it have the Test Result folder in the debug folder in the winform app before?
      • If it has the test result folder, could you get the test results in the Test Result folder of the winform app when you were running it before?
      • Could the test playback normally after you upload the test in your winform app?

    Since I didn’t repro this issue, so I suggest you check the result in your side, for example, if you could get the result before, I suggest you try to run the two projects in another PC, so we could make sure that it is not related to your VS. Or you could try to reset your VS settings, and reopen your APP in default settings. But if you couldn’t get the results before, I suggest you would check your test project, and make sure that whether the result is saved in the test project.

    If you didn’t have other machine, you could send the project to me, I will try to run it in my PC, you could send it to jackzhai at Hotmail dot com. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, October 9, 2012 9:01 AM
    Moderator
  • IF this is 2012 you have to run test via command line and create trx file there... MS took this out in 2012

    MK

    Tuesday, October 9, 2012 10:38 AM
  • Hi Tu,

    I am writing to check the status of the issue on your side. 

    What about this problem now?

    Would you mind letting us know the result of the suggestion?

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, October 11, 2012 7:36 AM
    Moderator
  • Hi Jack,

    I still can not see the test results .trx files, so I generated a report by writing a method to create a report in my code.

    Regards,

    Tu.

    Monday, October 15, 2012 11:05 PM