Hi!
I am trying to implement some unit test codes and run them, but the “Available Test Items” field is empty upon opening the Unit Test Page. When I try reloading available tests an error message pops up that tests could not be requested from http://127.0.0.1:80. Although the target is online, target status is in RUN mode, unit test solution is installed, B&R Web server is enabled and the requested port matches the configured one, still nothing can be seen on my window. I am not exactly sure how the testing works, where the test items are coming from and why I do not see them.. Can somebody help me find my test cases?
Hi,
it sounds like that everything is set up, but no test suite(s) / test cases are defined.
I would propose to check the unit test section of the B&R DevOps package on github, especially the Getting started pdf from here.
Additionally, I found a three steps video tutorial on YouTube which I personally haven’t seen before, but it looks very interesting:
Best regards!
1 Like
Thank you for your prompt answer! I’ve watched the videos and went through the unit test section thoroughly and learned new things, however the initial issue hasn’t been solved. I created a new, blank project with only the sample tests in it and tried to execute those cases but the situation is the same. I can see the configured sample test items but that is just because there is a test configuration xml by default in the working directory. Once I delete the xml file, I cannot retrieve them. I also tried configuring Opc Ua, changed TCP port number and tried to reload available test items with the new configuration… unsuccessfully.
Hi,
so if I understand right, you use a blank project with imported TS_Unit_Test solution and the getting started sample from there.
Everything is setup, compiled, downloaded, but you see something like that:
If yes, please check again if the library “UtWs” is really deployed and downloaded (“UtWs” is the webservice backend for the unit test solution). If that library isn’t deployed, I get the behavior of the screenshot above.
After deploying and downlading “UtWs”, it looks like that:
I tested with a real target, so I’m not sure if the’re some more influences by ArSim / simulated PLC, but first I would propose to check if everything needed is deployed to get the simple sample running:
“Green” are the core components of the test framework (UnitTest, UtMgr, UtWs), “blue” are the test suite (task SPL_CalcTe) and the “object to test” (library SPLMyCalc).
Best regards.
1 Like
I deployed the necessary libraries and the only difference from your window is that in the bottom-right corner I have “invalid service communication” instead of “no connection”

Hi,
I’m sorry, I tried but I’m not able to reproduce that issue.
I tried also to switch my existing configuration I tested on real hardware to Simulation, and it worked like expected.
The info “invalid service communication” I haven’t seen before. For me, it looks a bit like that the communication of the webservice based backend is somehow “disturbed/blocked” (maybe some security countermeasure issue?).
Could you please try to send a request to the backend directly by opening a browser when ArSim is running and using the URL “http://127.0.0.1:80/WsTest/”
What is the response you get?
At my running system, it looks like:
Hi,
Trying connecting to other ports gave me the “no communication” info, so the issue was really with the used port. I changed the webserver´s TCP port number, transferred it and then it works now.
Thank you for your help!
1 Like
Hi @Martin_Szilagyi,
just because I’m curious about:
for my understanding, it worked after changing the tcp port 80 to a different port, because port 80 was already in use by some other system or webserver (because if port 80 isn’t in use by “someone else”, I don’t understand the status “invalid service communication” instead of “no connection”).
Can you confirm that, was/is port 80 in use by something different then ArSim?
Thanks in advance!
Hey!
Yes, it was used by something else and I wasn’t aware of that.
1 Like