Re: [testdrivendevelopment] How would you TDD a website front-end?

"George Dinwiddie" <[email protected]> Thu, 2 Jan 2020 21:52:17 -0500
Newsgroups gmane.comp.programming.test-driven-development
Organization iDIA Computing, LLC
Message-ID <[email protected]>
Alan,

I would test the business logic of the model/web service.
I would also have a few tests that make sure the view is wired correctly=
=20
to the model/web service. Not many of these.
I might also have tests that provide model data to the view and make=20
verifications that it handles them correctly. This can be hard.

  - George

On 1/2/20 8:49 PM, Alan Baljeu via Groups.Io wrote:
> The pattern I have is
>=20
> User inputs a value
> Form posts value to server
> Server responds with new model data.
> Form reconfigures.
>=20
> "Test changes to the model" then I think means testing the web service.=
=20
> So don't test the view?
>=20
> Alan Baljeu
> [email protected]
>=20
>=20
>=20
> On Thursday, January 2, 2020, 06:58:20 p.m. EST, Avi Kessner=20
> <[email protected]> wrote:
>=20
>=20
> Test the changes to the model, not the GUI itself.
>=20
> On Fri, Jan 3, 2020, 00:26 George Dinwiddie <[email protected]=20
> <mailto:[email protected]>> wrote:
>=20
>     Alan,
>=20
>     Way back, I played with test-driving AWT and Java Swing UIs, startin=
g
>     with just jUnit. Given the availability of web driver libraries, you
>     can
>     do similar things much more easily.
>=20
>     In general, I tested the GUI with a test API to make sure things wer=
e
>     wired up correctly. I tested the actual API to make sure the system
>     worked correctly.
>=20
>     In
>     https://github.com/gdinwiddie/EquineHoroscope/tree/master/src/test/j=
ava/com/gdinwiddie/equinehoroscope/acceptance
>=20
>     you can see an example of re-using a test that drove the API
>     creation to
>     check the same result from the GUI by injecting a different adapter =
to
>     talk with the system under test.
>=20
>      =C2=A0 - George
>=20
>      > Alan Baljeu
>      > [email protected] <mailto:[email protected]>
>      >
>      >
>=20
>     --=20
>      =20
>     --------------------------------------------------------------------=
--
>      =C2=A0 =C2=A0* George Dinwiddie * http://blog.gdinwiddie.com
>      =C2=A0 =C2=A0Software Development http://www.idiacomputing.com
>      =C2=A0 =C2=A0Consultant and Coach
>      =20
>     --------------------------------------------------------------------=
--
>=20
>=20
>=20
>=20
>=20

--=20
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach
  ----------------------------------------------------------------------


-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#35829): https://groups.io/g/testdrivendevelopment/mess=
age/35829
Mute This Topic: https://groups.io/mt/69387056/3268755
Group Owner: [email protected]
Unsubscribe: https://groups.io/g/testdrivendevelopment/leave/6156322/74455=
6386/xyzzy  [[email protected]]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-