Closed ricaun closed 2 years ago
Hi. Sometimes I have a similar issue with the App. Not sure if it is the same. The App says 'no test executed', but Revit runs the test, just the response is missing. Till now I'm not sure what this causes. Probably a communication-timing failure. I will try to reproduce and make some adjustments.
In my case only happens when the Console starts Revit, probably a delayed show work.
I don't know how the communication between the Revit and the Revit.TestRunner works.
I noted is not possible to run 2 Revit at the same time. 😢
Needs some investigation. Multiple Revits are not supported at the moment, but I will take this in the backlog.
@tobiasfloescher-geberit could you help me to understand how the communication between Revit and the Revit.TestRunner.Console works?
By looking at the code, RunnerController
basically run an idling event and check some folders using the FileServer
to find some .request
files.
I supposed that's how works on the Revit side...
Correct, the FileServer
looks for some .request
files in the specified route (subfolder) and run the Route
. This is triggered by the OnIdle event of Revit. Except the HomeRoute (concurrent), this runs in a seperate Task.
The FileClient
is the counter part. GetJson
calls a http like 'Get' by writing the .request
file to the specified route folder and waits for the .response
file in this folder, written by the Server.
The files are serialized jsons.
Nice! I gonna try to make some tests related to the Service may not be running.
About Revit multi-version, probably a specified route (subfolder) with the Revit version should separate the .request
files for each Revit version. 😊
I kinda fix the issue by adding a delay to wait for the resultFile
.
// Wait resultFile
for (int i = 0; i < 10; i++)
if (!File.Exists(resultFile))
{
Console.WriteLine($"."); // Wait resultFile
await Task.Delay(200, cancellationToken);
}
And found some problem with revit.IsNew
not killing Revit.
And add some cmd files on the Revit.TestRunner.SampleTestProject2
to make easy to test using the Revit.TestRunner.Console.exe
.
Gonna create a PR tomorrow: https://github.com/ricaun/Revit.TestRunner
I had this strange problem...
Sometimes when I execute Revit.TestRunner.Console.exe to make some tests. I receive the message:
Tests not executed! Service may not be running.
Everything is installed correctly, sometimes works fine others I receive this message...I don't know what could be wrong, maybe my computer is slow or Revit does not have time to finish the addin initialization.
Any idea?