aerospike / aerospike-client-csharp

Aerospike C# Client Library
70 stars 47 forks source link

TestSuite? #7

Closed gregoryyoung closed 8 years ago

gregoryyoung commented 9 years ago

Is there some test suite associated with this that I am missing?

BrianNichols commented 9 years ago

No. There is, however, AerospikeDemo which covers most client functionality.

Caldas commented 9 years ago

@BrianNichols do you inteend to create a test suite soon?

BrianNichols commented 9 years ago

A test suite is on the longer term roadmap.

BrianNichols commented 9 years ago

Version 3.1.4 has been released which contains a unit test suite.

Caldas commented 9 years ago

Why do you mixed a form application inside a test project?

gregoryyoung commented 9 years ago

@Caldas I agree that is a bit bizarre :)

BrianNichols commented 9 years ago

It's useful to be prompted for the password (for Enterprise version) and possibly other settings (hostname) before running the tests.

We can add the ability to bypass the form prompt in the next release. In the meantime, just replace the following code in Suite.cs.

Old

TestForm form = new TestForm();
if (form.ShowDialog() != DialogResult.OK)
{
    Application.Exit();
}

New

Args.Instance.Connect();
gregoryyoung commented 9 years ago

I am guessing (don't mean to be offensive in any way) this is your first time writing unit tests?

On Mon, Aug 3, 2015 at 7:54 PM, Brian Nichols notifications@github.com wrote:

It's useful to be prompted for the password (for Enterprise version) and possibly other settings (hostname) before running the tests.

We can add the ability to bypass the form prompt in the next release. In the meantime, just replace the following code in Suite.cs.

Old

TestForm form = new TestForm();

if (form.ShowDialog() != DialogResult.OK) { Application.Exit(); }

New

Args.Instance.Connect();

— Reply to this email directly or view it on GitHub https://github.com/aerospike/aerospike-client-csharp/issues/7#issuecomment-127349581 .

Studying for the Turing test

BrianNichols commented 9 years ago

Please explain.

Caldas commented 9 years ago

@BrianNichols I beleive @gregoryyoung was talking about the idea that unit test must have everything coded (or specified)

gregoryyoung commented 9 years ago

Yes @Caldas sorry @BrianNichols I missed your reply. I really didn't mean to be offensive at all. Seeing a "configuration UI" in unit tests

"It's useful to be prompted for the password (for Enterprise version) and possibly other settings (hostname) before running the tests.

We can add the ability to bypass the form prompt in the next release. In the meantime, just replace the following code in Suite.cs."

is highly suspect. This is not at all a common practice in people writing unit tests. As an example what would happen if this is running on my CI server?

A more idiomatic approach might be to include say an embedded version of aerospike with the tests that is run to interact with (or something that maintains the same contracts). Another option would be to put this information into code/a config file etc. Prompting me when running unit tests is just not generally a good idea.

Sorry again for missing the previous response.

Greg

manigandham commented 9 years ago

I think there's some confusion here. It seems @gregoryyoung is looking for unit tests for the source code itself (correct?).

The Test form project in this repo is for testing the driver functionality itself and how it interacts with the database, not code level unit tests. Maybe it's the name that's confusing but it can just be thought of as a UI that lets you run the demo code (in the demo project).

You can still run the unit tests in the other files automatically after wiring up the required config info.