Simpletest Conundrum

Jeff Greenberg <[email protected]> Mon, 1 Dec 2014 14:19:08 -0500
Newsgroups gmane.comp.php.drupal.devel
Message-ID <CAPpCgRbm_eezcpFngsJcad+cQLE9hSYqhLhg7C7XhxZEgMPwZQ@mail.gmail.com>
--089e01183e4c12c1af05092c7cb8
Content-Type: text/plain; charset=UTF-8

In Drupal 7, I have a requirement to simpletest a functional group of
methods... one test comprised of about 1800 subtest permutations.

The issue I have is that these are back-end functions with no UI
interaction, yet simpletest unit test, from what I read, does not provide
the functionality for accessing the db, creating test tables and data, etc.

Do I fudge it by having a menu callback, or by having an admin page with a
button if necessary, so that I can webtest, or do I manually include
db.inc, etc. so that I can access the db, (though I think it would need to
be much dirtier than that)?

Jeff

-- 
---
drupal.org/user/367108
linkedin.com/in/jeffrgreenberg
accidentalcoder.com / ayendesigns.com
@accidentalcoder

--089e01183e4c12c1af05092c7cb8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">In Drupal 7, I have a requirement to simpletest a function=
al group of methods... one test comprised of about 1800 subtest permutation=
s.=C2=A0<div><br></div><div>The issue I have is that these are back-end fun=
ctions with no UI interaction, yet simpletest unit test, from what I read, =
does not provide the functionality for accessing the db, creating test tabl=
es and data, etc.</div><div><br></div><div>Do I fudge it by having a menu c=
allback, or by having an admin page with a button if necessary, so that I c=
an webtest, or do I manually include db.inc, etc. so that I can access the =
db, (though I think it would need to be much dirtier than that)?</div><div>=
<br></div><div>Jeff<br clear=3D"all"><div><br></div>-- <br><div class=3D"gm=
ail_signature">---<div><a href=3D"http://drupal.org/user/367108" target=3D"=
_blank">drupal.org/user/367108</a></div><div><a href=3D"http://linkedin.com=
/in/jeffrgreenberg" target=3D"_blank">linkedin.com/in/jeffrgreenberg</a></d=
iv><div><a href=3D"http://accidentalcoder.com" target=3D"_blank">accidental=
coder.com</a> / <a href=3D"http://ayendesigns.com" target=3D"_blank">ayende=
signs.com</a></div><div>@accidentalcoder</div></div>
</div></div>

--089e01183e4c12c1af05092c7cb8--