-
Notifications
You must be signed in to change notification settings - Fork 1
/
feed.xml
78 lines (77 loc) · 4.43 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.4.3">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2020-03-03T22:21:47-06:00</updated><id>http://localhost:4000/</id><title type="html">OpenTest</title><entry><title type="html">Database testing for improved test coverage and execution speed</title><link href="http://localhost:4000/blog/2018/11/26/database-testing.html" rel="alternate" type="text/html" title="Database testing for improved test coverage and execution speed" /><published>2018-11-26T00:00:00-06:00</published><updated>2018-11-26T00:00:00-06:00</updated><id>http://localhost:4000/blog/2018/11/26/database-testing</id><content type="html" xml:base="http://localhost:4000/blog/2018/11/26/database-testing.html"><div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<div class="title">Note</div>
</td>
<td class="content">
Database testing can mean different things for different people. This
article refers to the practice of verifying the correctness of the data stored
in relational databases as a result of executing an automated UI or API test.
</td>
</tr>
</table>
</div>
<div class="sect1">
<h2 id="overview">Overview</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Most non-trivial applications make use of a database to store and retrieve data.
In fact, as many of us find out the hard way, the database layer of an
application often makes the difference between a working system and a broken
one. This is why your automated tests will end up altering data in some
database, either directly or indirectly. It stands to reason that the usefulness
and effectiveness of automated tests can be significantly improved by inserting
database validation steps at strategically-placed points in the flow of a test.
Similarly, test execution speed can be improved by short-circuiting some of the
time-consuming steps in a test and replacing them with simple database update
statements.</p>
</div>
<div class="paragraph">
<p>OpenTest 1.0.8 introduces two keywords that can be leveraged to add database testing steps: <a href="/reference/generic-keywords.html#jdbcquery">JdbcQuery</a> and <a href="/reference/generic-keywords.html#jdbcupdate">JdbcUpdate</a>.</p>
</div>
<div class="paragraph">
<p>To be successful at database testing, you will need to:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Have basic familiarity with the SQL language and with relational database
concepts, in general.</p>
</li>
<li>
<p>If you are part of a QA group that is external to the dev team, you need a
good working relationship and communication channels with the developers, since
they are going to be the ones to help you decipher the "internals" of the
application logic and how it interacts with the database.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Tips, tricks and pitfalls:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>Keep in mind that, once you touched the database (either to update it or
validate it), you just left the black-box testing space and stepped into the
potentially perilous realm of white-box testing. In order to be successful at
this you&#8217;ll need to be fairly familiar with the inner workings of the
application under test, so you can properly identify the tables and fields that
are being used to store the data you are trying to get at.</p>
</li>
<li>
<p>Try to avoid depending on database structures that are likely to change often.</p>
</li>
<li>
<p>Try to replace database tests with API tests, if such APIs are available.</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="a-practical-example">A practical example</h2>
<div class="sectionbody">
</div>
</div></content><author><name></name></author></entry></feed>