-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTM not generating index file for HtmlTestResults : Fileserver Test suite 3.19.9.0 #208
Comments
Hi Daman Saini, I have made a private build to help better diagnosing this issue. Please download HtmlTestLogger.zip. Extract the zip file, and you will get two files, Microsoft.Protocols.TestTools.Html.TestLogger.dll and Microsoft.Protocols.TestTools.Html.TestLogger.pdb. Go to Note: The above location is for Visual Studio 2019 community, if you are using a different version of Visual Studio, please modify the corresponding part. Then, re-run the test cases in PTM. A debug file would be generated at Best Regards, |
Log file attached. Below is the error in log file. If fixing this issue will take time then please see if you can provide any workaround for the time being,
|
Hi Daman Saini, I have come up with a possible fix. Please download HtmlTestLogger.zip, and follow the same steps above to re-run the test suite to see if it works. Besides, I also want to understand your scenario, so that I can provide some other workaround. If you want to programmatically analyze the test results, you can export a test report as shown below. Best Regards, |
Hi JiaJun, I tested the attached html logger and now its creating the index file. Thanks for the timely help. Will run it multiple times and incase see any issue, will report here. Regards, |
Hi Daman, I believe the issue is caused by test categories not being generated correctly. The previous fix is kind of a workaround. If you check LoggerDebug.txt, there is a section where test categories is printed, like below:
If there is no category shown there, the problem still remains. Can you try HtmlTestLogger-CheckCategory.zip and send the log file to help us diagnosing this issue? Thanks, |
We're also seeing this same issue. Additionally, the packet captures stopped being generated at the same time this issue showed up. Do you think that they'll have the same root cause, or shall we open another bug? |
Can you try downloading HtmlTestLogger-CheckCategory.zip and following the steps I have mentioned above to see whether index.html is generated. And sharing As for the packet capture issue, do you mean that you have enabled network capture in Protocol Test Manager but no capture files generated in BTW, are those two issues happened after you installed a new version of test suite and PTM, or it just doesn't work at some time? |
I had at some point seen the index.html and the packet capture working on this version of the software. I then noticed when trying to diagnose a failure that neither the index.html nor the packet capture were generated. I have attached the debug log. Did your modified DLL contain a fix? When I ran a test this time, it generated both the index.html and the packet capture. |
Hi Matt, The above dll contains a work around to fix the issue that index.html is not generated. However, from the log you attached, it seems this issue didn’t happen on your side. Categories are correctly detected. [18:44:16.378] Method CloseFileTestCaseS0 is in class CloseFileTestCase, belongs to category Model,FSA,CloseFile,NonSmb,Positive Can you try to re-run, with both the original Thanks, |
I'm seeing the issue as well with vstest to test my dll generated with netcoreapp2.2. The exception is saying "Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies". Please advise how to fix/workaround it. |
@JiajunW any ideas how to fix it? |
Hi @Damudan, We run Windows protocol test suite on .NET Framework. While according to your description, you are using the html test logger with unit test on .NET Core. I am not sure whether the exception is caused by the different runtimes. Can you share the steps for me to reproduce this issue? And what command did you use to run the test cases? Thanks, |
Hi @JiajunW Sure thing. The runtime exceptions throws... |
Hi @Damudan, Here is a quick workaround, you can have a try to check if it works. As for the runtime exception, HtmlTestLogger is currently used along with Windows Protocol Test Suite, which runs on .NET Framework, and we haven't tested it against .NET Core applications. We will investigate and try to solve this issue. |
@JiajunW, thanks a lot Jiajun. Yes, the workaround works to some extent, and I can view the results with under some groups. |
This issue has been fixed in commit microsoft/ProtocolTestFramework@b9c6a6b. Category info is now directly retrieved in @Damudan, for the special character in test name issue, as you already find a way to fix it, a pull request is welcomed to recognize your contribution. BTW, I am also curious how to put a special character in the test name. Currently we use the test name as part of the result filename. If the test name can be customized, we need to escape more illegal characters to make sure the result file can be created. Regards, |
Thanks @JiajunW I tried to push but fails to login: It's an easy workaround though, in the ConvertToTestCase function, just replace the colon the result test case name may contain: |
Hi @Damudan, Can you confirm that all test categories are generated correctly with my latest fix? Currently, the purpose of the Protocol Test Framework is to use with Windows Protocol Test Suite, and .NET Core is not our target. For Windows Protocol Test Suite, colon is not a valid character in our test suite. Regards, |
@JiajunW , thanks I will try that. |
Hi @Damudan, Do you mean that you have tried the latest code on staging branch of Protocol Test Framework but it doesn’t work? I have added some debugging output to help diagnosing the issue. Please download HtmlTestLogger.zip. Extract the zip file, and you will get two files, Microsoft.Protocols.TestTools.Html.TestLogger.dll and Microsoft.Protocols.TestTools.Html.TestLogger.pdb. Go to Re-run your cases and check if the categories are generated in index.html. If categories are not generated, please upload the debug file Thanks, |
@JiajunW It looks you didn't apply the fix for replace colon in the dll, anyway the log should be helpful as well, it shows path too long error and path format is not supported. Thanks |
Hi Kevin, I didn’t apply your workaround because it won’t happen in our test suite cases. I want to focus on the category issue right now. According to the log, it seems that you are using xUnit for unit test. However, Protocol Test Framework is designed for Windows Protocol Test Suites, which uses .NET Framework and MSTest. Currently we haven't supported test framework other than MSTest. When it comes to other test frameworks, categories are handled differently, which is out of our scope. Thanks, |
Since this thread has been inactive for a long time, we close it for now. Feel free to reopen it if the problem remains. Windows Protocol Test Suites Development Team |
I am not sure if this issue comes under your scope or not but sending you this email in hope that you might be aware of this issue or have some workaround for it.
I was successfully able to run latest Fileserver Test suite 3.19.9.0 but for some reasons, the PTM stopped generating index file under htmlresults folder.
Please share if you know any workaround or steps to fix this.
All other files are there.
The text was updated successfully, but these errors were encountered: