Skip to content
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

Test finished named #37

Closed
wants to merge 3 commits into from

Conversation

slacAWallace
Copy link
Contributor

I was having issues getting TcUnit to recognize all tests were complete, and wait for all tests to register so I used a wrapper TEST and added a TEST_FINISHED_NAMED fun. to indicate when the wrapper test was complete. Also made another commit with just TEST_FINISHED so we don't have an extra function.

I ran TcVerifier but there are a lot of failed tests.

@sagatowski
Copy link
Member

Hi Alex!
Could you please send me a sample that recreates when TcUnit does not recognize a finished test? I think it's better to solve the real issue (bug in TcUnit?), so could you create a ticket, mark it as a bug and include the sample where the problem is recreated?

TcUnit-Verifier IS supposed to fail, it's testing the expected behaviour (tests output). It's in combination with the TcUnit-Verifier DotNet it makes sense (TcUnit-Verifier-TwinCAT output goes to the DotNet-program). I'll try to write some documentation when I have time that explains the concept of TcUnit-Verifier.

@sagatowski
Copy link
Member

I've updated the TcUnit-Verifier readme to explain how it works now. New text and graphics.
https://github.com/tcunit/TcUnit-Verifier

@slacAWallace
Copy link
Contributor Author

I'll make an issue. But I must say the example is probably pushing TcUnit, and "unit" testing to a point beyond the original intent. Regardless, it's proving very useful so thank you very much!

@slacAWallace
Copy link
Contributor Author

OK here's the example.
Very stateful test

sagatowski added a commit that referenced this pull request Aug 6, 2019
Added comments so it's clear(er) what the difference is between TEST_FINISHED and TEST_FINISHED_NAMED.
Removed some obsolete VAR_INPUT declarations from FB_Test.
@sagatowski
Copy link
Member

Solved in commit 4424dad.

I've merged your change. Please do a pull and add the warning.
I've created a separate issue for the warning.

Also make sure to add new tests that verify this functionality in TcUnit-Verifier. I've created an issue for that at:
https://github.com/tcunit/TcUnit-Verifier/issues/5

Make sure all new tests are working according to:
https://github.com/tcunit/TcUnit-Verifier/blob/master/README.md

Make sure all formatting for the new code is according to:
https://github.com/tcunit/TcUnit/blob/master/CONTRIBUTING.md

Thank you for your contribution!

@sagatowski sagatowski closed this Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants