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

Added Unit test for MC7Converter #58

Merged
merged 6 commits into from
Aug 19, 2016
Merged

Added Unit test for MC7Converter #58

merged 6 commits into from
Aug 19, 2016

Conversation

StefanHasensperling
Copy link
Contributor

Today I took a little bit of time to extract some MC7 blocks of an Online PLC and write some unit test for the MC7 converter. I reviewed the pre-converted AWL files for correctness (at least superficially).
Of course if the variable numbering scheme for the db's is changed (STAT0 ... STAT1.STATxxx), these tests might break, since i only implemented an quick string comparison.

The new files basically contain various different binary and awl S7Blocks where offline checks can be performed on.
The bin files are plain dumps obtained via an call to "PLCConnection.PLCGetBlockInMC7(...)"
The Awl files are the parsed awl code files for the corresponding files. these files are compared to
default Simatic manager online only output, in order to ensure correctness of the parsing

@jogibear9988
Copy link
Member

your tests do not run witha positive resilt ;-(

@jogibear9988
Copy link
Member

but i like this verry much

@StefanHasensperling
Copy link
Contributor Author

Yes I see, forgot to copy the binary files during the build. Sorry for that

@jogibear9988
Copy link
Member

still not workin ;-)

@StefanHasensperling
Copy link
Contributor Author

I dont know what the problem is. The test for FC's are failing for FC100, even though the test output looks fine. This must be some Whitespace or newline problem, where the outputs are the same, but not quite. I deactivated it for the moment.

Strange thing is,everything works on my machine. Maybe somebody has an better idea for checking the converter output.

@jogibear9988
Copy link
Member

i will have a look, next week

@jogibear9988 jogibear9988 merged commit 5ddcaf5 into dotnetprojects:master Aug 19, 2016
@StefanHasensperling
Copy link
Contributor Author

UnitTest Simatic Project.zip

OK, I uploaded the project containing the blocks that i used in the unit tests. I think this project should be included in the project

@jogibear9988
Copy link
Member

The Test now is fixed. Was a Problem with numberformat for reals!

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.

2 participants