Eiffel.NET and Testing Library

54 views
Skip to first unread message

Larry Rix

unread,
Dec 2, 2017, 12:31:31 PM12/2/17
to Eiffel Users
Has anyone recently (like currently have working) added testing to an Eiffel.NET project?

I have attempted to add it and get two distinct errors:

1. C:\Program Files (x86)\Eiffel Software\EiffelStudio 17.05 GPL\library\testing\system\eqa_system_output_processor.e <-- has an errant redefine for file_close.
2. I hack the file above and remove the errant redefine feature reference and then get linker issues (see the attached PNG file).

So--has anyone attempted to add testing library to an Eiffel.NET project?
eiffel_dotnet_testing_library_error.png

Emmanuel Stapf

unread,
Dec 3, 2017, 11:46:52 PM12/3/17
to eiffel...@googlegroups.com

Hi Larry,

 

The testing library and Auto Test do not work yet with .NET. It can only be used in classic Eiffel.

 

Manu

 

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.

Larry Rix

unread,
Dec 5, 2017, 7:39:28 AM12/5/17
to Eiffel Users
So much for testing.

I just proved that I can use PLAIN_TEXT_FILE from within the .NET Eiffel project to at least write to a text file.

Yesterday, I had quite a long drive to take and was considering what I might do as an alternative to AutoTest. What I am considering is just writing a small set of testing classes with assertions, but instead of working within EiffelStudio, they will work from within a specific target.

The new ECF target will have a root class and make that kicks off a series of calls to the "test" classes—following a cycle like:

1. Create an instance of the test class
2. Use reflection (INTERNAL) to identify the test routines and run them.
3. The test class inherits from the assertion-bearing classes.
4. The output of the tests will be sent to a text file.

I can then read the text file to pick up the results of running the tests.

Downfalls of this: Not being able to run interactively like AutoTest in EiffelStudio. 

That's a big deal, but I will get over it. At least I can have testing.

NOTE: You all have thrown your weight behind Eiffel Web Framework, but you had a much greater star to hitch your wagon to: Microsoft .NET! It has a rich set of technologies and libraries to choose from. I'd like to take advantage of that now with these two projects in front of me. I'd like to use Eiffel to make money with. I'd like you all to have a part of that as well.

BTW: It's not much money. Just a small about. This is NOT Jinny. The pockets are not deep like that. But something is better than nothing.

Peter Gummer

unread,
Dec 5, 2017, 3:12:57 PM12/5/17
to 'Alexander Kogtenkov' via Eiffel Users
Larry Rix <lar...@moonshotsoftware.com> wrote:
>
> Yesterday, I had quite a long drive to take and was considering what I might do as an alternative to AutoTest. What I am considering is just writing a small set of testing classes with assertions, but instead of working within EiffelStudio, they will work from within a specific target.


Rather than writing your own, Larry, you should be able to use one of the existing .NET testing tools. As well as saving you some work, the experience of running the tests should be a lot nicer than having to read the results from a text file.

You’d probably have to use one of the .NET testing frameworks, however, instead of the Eiffel Testing library.

Regards,
Peter

Larry Rix

unread,
Dec 6, 2017, 9:57:13 AM12/6/17
to Eiffel Users
Hi Peter,

The testing facilities of .NET are there and I am presently using them for a client here locally. So, I understand your point.

To be sure—your suggestion is to exclusively use the .NET testing facilities to test the API of an Eiffel-based assembly, yes?

If so, this is an okay work around. It would be the same as if .NET had no testing capacity and I wrote tests for C# classes from Eiffel. A little cumbersome because it means I have to write code in one, switch-to-the-other, and then test—continuously switching back and forth. I'd rather just write in C# if I didn't have any testing capacity directly in Eiffel at all. The few classes I wrote have settled into a nice little system. The only downside is not having it in the EiffelStudio AutoTest IDE.

Honestly, I don't mind dealing with the text file. It's simple enough to correlate the test tags of the tests recorded in the text file with the test code. So, the text file seems to work out pretty well. Opening the text file is a small burden.

Thank you for the feedback. It really helps me to know the experience of others!

Peter Gummer

unread,
Dec 6, 2017, 2:36:17 PM12/6/17
to 'Alexander Kogtenkov' via Eiffel Users
Larry Rix <lar...@moonshotsoftware.com> wrote:
>
> To be sure—your suggestion is to exclusively use the .NET testing facilities to test the API of an Eiffel-based assembly, yes?

Hi Larry, yes that’s what I was suggesting.


> If so, this is an okay work around. It would be the same as if .NET had no testing capacity and I wrote tests for C# classes from Eiffel. A little cumbersome because it means I have to write code in one, switch-to-the-other, and then test—continuously switching back and forth. I'd rather just write in C# if I didn't have any testing capacity directly in Eiffel at all.

No, I didn’t intend that you’d write your tests in C#. You should be able to write all of your code in Eiffel, including the tests. I don’t think that I ever tried this, but in theory it should work.

On the other hand, you seem to be finding that a lot of things that I’m pretty sure used to work 10 years ago aren’t working for you today. Maybe ESpec as suggested by Jonathan would is your best bet.

Regards,
Peter

Larry Rix

unread,
Dec 28, 2017, 5:34:14 PM12/28/17
to Eiffel Users
Actually—I have given up. I will be working exclusively with C#.NET, Java, and others from now on.

Thanks
Reply all
Reply to author
Forward
0 new messages