Phlip | 1 Jul 2005 20:35
Picon
Gravatar

[TFUI] FlexWiki OBT via NUnit

TFUIers:

Let's do a little experiment. Download MS's FlexWiki's source from here:

    http://sourceforge.net/projects/flexwiki

Now install NUnit-2.2.0.msi from:

    http://www.nunit.org/download.html

Load FlexWikiCore.sln in DevEnv.exe (Visual Studio 7) and observe it
has a FlexWiki.UnitTests package. (Kewl! MS may yet compete with
Google, huh?)

Compile the tests, and run "C:\Program Files\NUnit 2.2\bin\nunit-gui.exe". 

Open FlexWiki.UnitTests\bin\Debug\FlexWiki.UnitTests.dll

The first problem is NUnit complains there are no test fixtures. I
don't understand how it could lose track of them if they have these
newfangled [TestFixture] compilable comments on them.

The next problem: This is hardly One Button Testing compliant. I need
to type, hit Go, optionally keep typing, collect a Pass or Fail, and
keep typing. I really doubt that people proficient with .NET would
save, compile, run a command line, open a DLL, and run it just to
test.

How are people using NUnit, and what is its lifecycle like?

(Continue reading)

Charlie Poole | 3 Jul 2005 11:49
Favicon

RE: [TFUI] FlexWiki OBT via NUnit

Hi Phlip,

I'm tied up with some work at the moment, but I'll try this myself when
I can.

Meanwhile, check to see if FlexWiki is using an older version of NUnit
for
its tests. We only introduced the ability to recognize tests built
against older
versions of NUnit with NUnit 2.2.2.

As for the lifecycle - if I understand what you mean by it - most of us
run NUnit
once, keep it running and then click the run button each time we need to

run tests. So it's one button after some intitial setup. 

Charlie

> -----Original Message-----
> From: TestFirstUserInterfaces@... 
> [mailto:TestFirstUserInterfaces@...] On Behalf Of Phlip
> Sent: Friday, July 01, 2005 7:36 PM
> To: testfirstuserinterfaces@...
> Subject: [TFUI] FlexWiki OBT via NUnit
> 
> 
> TFUIers:
> 
> Let's do a little experiment. Download MS's FlexWiki's source 
(Continue reading)

Anthony Williams | 4 Jul 2005 10:22
X-Face
Picon
Favicon

Re: [TFUI] FlexWiki OBT via NUnit

Phlip <phlip2005@...> writes:

> TFUIers:
>
> Let's do a little experiment. Download MS's FlexWiki's source from here:
>
>     http://sourceforge.net/projects/flexwiki
>
> Now install NUnit-2.2.0.msi from:
>
>     http://www.nunit.org/download.html
>
> Load FlexWikiCore.sln in DevEnv.exe (Visual Studio 7) and observe it
> has a FlexWiki.UnitTests package. (Kewl! MS may yet compete with
> Google, huh?)
>
> Compile the tests, and run "C:\Program Files\NUnit 2.2\bin\nunit-gui.exe". 
>
> Open FlexWiki.UnitTests\bin\Debug\FlexWiki.UnitTests.dll
>
> The first problem is NUnit complains there are no test fixtures. I
> don't understand how it could lose track of them if they have these
> newfangled [TestFixture] compilable comments on them.
>
> The next problem: This is hardly One Button Testing compliant. I need
> to type, hit Go, optionally keep typing, collect a Pass or Fail, and
> keep typing. I really doubt that people proficient with .NET would
> save, compile, run a command line, open a DLL, and run it just to
> test.
>
(Continue reading)

Phlip | 10 Jul 2005 02:33
Picon
Gravatar

Re: [TFUI] FlexWiki OBT via NUnit

Anthony Williams wrote:

> When I've used NUnit (which is admittedly not a great deal), I've used the
> text mode runner, and tied it in to the build, so when I build the app, the
> tests get run automatically, and the output dumped to the build log. IIRC,
> the test failures give a file and line number for the failed assert when run
> under .NET, but not under Mono.

[I'm still stuck on twiddling the FlexWiki properties, not knowing
what I'm looking for, and drawing comics while DevEnv.exe slowly
refreshes its screen...]

But can't y'all add a tweak to NUnit to make it automatically launch
whenever your program's EXE file's modification time changes?

--

-- 
  Phlip
  http://www.c2.com/cgi/wiki?ZeekLand

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe@...

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

<*> To unsubscribe from this group, send an email to:
    TestFirstUserInterfaces-unsubscribe@...

(Continue reading)

Phlip | 12 Jul 2005 14:44
Picon
Gravatar

Re: [TFUI] FlexWiki OBT via NUnit

Charlie Poole wrote:

> Meanwhile, check to see if FlexWiki is using an older version of NUnit
> for
> its tests. We only introduced the ability to recognize tests built
> against older
> versions of NUnit with NUnit 2.2.2.

Hm. So after I clickety click click my favorite input device (the
mouse) to change each References, separately, from 2.1.4 to 2.2.2, the
system still insists I have compiled for 2.1.4.

This leads to the usual philosophical question about MS products - why
is anyone buying this stuff??

I'm gonna refresh the FlexWiki source, then get NUnit 2.1.4.

--

-- 
  Phlip
  http://www.c2.com/cgi/wiki?ZeekLand

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe@...

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

<*> To unsubscribe from this group, send an email to:
(Continue reading)

Charlie Poole | 13 Jul 2005 06:04
Favicon

RE: [TFUI] FlexWiki OBT via NUnit

This often happens if VS decided to copy an nunit assembly. I've had to
completely erase all obj and bin directories, then remove and replace
the references. To be sure extra copies aren't made, make sure the
nunit.framework assembly is installed in the GAC. Our msi does this, but
if you install manually, you have to do it yourself.

Time allowing, I plan to take a look at this myself, as I'm looking for
a .NET-based wiki.

Charlie

> -----Original Message-----
> From: TestFirstUserInterfaces@...
> [mailto:TestFirstUserInterfaces@...] On Behalf Of Phlip
> Sent: Tuesday, July 12, 2005 5:44 AM
> To: TestFirstUserInterfaces@...
> Subject: Re: [TFUI] FlexWiki OBT via NUnit
> 
> 
> Charlie Poole wrote:
> 
> > Meanwhile, check to see if FlexWiki is using an older
> version of NUnit
> > for its tests. We only introduced the ability to recognize
> tests built
> > against older
> > versions of NUnit with NUnit 2.2.2.
> 
> Hm. So after I clickety click click my favorite input device (the
> mouse) to change each References, separately, from 2.1.4 to
(Continue reading)

Phlip | 22 Jul 2005 04:24
Picon
Gravatar

[TFUI] Test Driven Wizardry

TFUI:

My research has made me an expert at writing technical questions on
the MS newsgroup that professionals and MVPs cannot answer.

Today's installment is called "Test Driven Access Development". I'l
copy it here so we can at least discuss the ramifications, if not the
actual technical answer:

The canonic way to write "unit" tests for a database is this:

  setUp
      begin a transaction
      create Sample Database

  test_foo
        select stuff in the database
        assert it matches the samples

  test_bar
        update stuff in the database
        select it back
        assert it matches

   tearDown
        rollback the transaction

That's relatively efficient because transactions buffer everything
with miminal overhead. I want to do that to Access while I test a
Form. And I want to do it from VB Classic, not from VBA inside Access.
(Continue reading)

Bayley, Alistair | 22 Jul 2005 09:31

RE: [TFUI] Test Driven Wizardry

> From: Phlip [mailto:phlip2005@...] 
> 
> To workaround, I can of course just fudge. I could manually build a
> transaction by copying the DataTable to a backup table, then restore
> it during tearDown(). Or I can let the test data polute the golden
> copy of the database.
> 
> The question is this: Am I missing some tweak in the interaction of
> BeginTrans and the Form architecture where I can have a real
> transaction, and the Form can display data from that transaction
> transparently?

Not answering your question (sorry), but...

Why are you TDD'ing against a "golden copy" of the database? IMO you'd be
better off working against an empty database, where you wouldn't be
restricted to performing tests inside a single transaction and rolling back.
And given that it's Access, having a local copy to ravage to your
satisfaction ought to be fairly easy.

Then again, the restriction/discipline of single-transaction-per-test might
lead you to better design... but that's a thought for a different list.

Alistair.

-----------------------------------------
*****************************************************************
Confidentiality Note: The information contained in this   message, and any
attachments, may contain confidential   and/or privileged material. It is
intended solely for the   person(s) or entity to which it is addressed. Any
(Continue reading)

Thomas Eyde | 22 Jul 2005 12:42
Picon

Re: [TFUI] Test Driven Wizardry

I think your connection is opened exclusively. I have experienced
similar situations when I use ADO against the database, but I opened
it in Access first and left it running.

Or it could be that Access itself is confused and fail to recognize
that the caller of BeginTrans and DoCmd in fact is the same user.

I know there is a Workspace object or something in there. See if you
can do the same operations via the Workspace, or at least get your
worker objects from there. Perhaps that will solve the transaction
confusion.

See if you can use ADO directly to control the transaction and the
database building. I guess you have to do some trickery to make the
data visible outside of the ADO context.

I guess you don't have the choice to make all the gui in VB and leave
Access with just the data?

--
Thomas

To unsubscribe, email:
TestFirstUserInterfaces-unsubscribe@...

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/TestFirstUserInterfaces/

(Continue reading)

Phlip | 22 Jul 2005 16:25
Picon
Gravatar

Re: [TFUI] Test Driven Wizardry

Thomas Eyde wrote:

> I think your connection is opened exclusively. I have experienced
> similar situations when I use ADO against the database, but I opened
> it in Access first and left it running.

One '69 Camaro has answered how to share the connection, on USENET.

I guess this breaks my perfect record of unanswerable questions!

But I'm using DAO, not ADO, because it's closer to Access.

> I guess you don't have the choice to make all the gui in VB and leave
> Access with just the data?

Build don't buy?

We are TDDers! We can do anything!

Bayley, Alistair wrote:

> Why are you TDD'ing against a "golden copy" of the
> database?

Because I'm still experimenting how to layer things and what to call
things. Of course the untransacted database isn't the shops "golden"
version.

> IMO you'd be
> better off working against an empty database, where
(Continue reading)


Gmane