Redian新闻
>
外行问个化学paper的初级问题,轻拍砖
avatar
外行问个化学paper的初级问题,轻拍砖# ChemEng - 化学工程
c*n
1
our previous developers just use our one and only single QA db, and assume
that the content is so and so, but over time, the content changes, so the
test cases all gradually fail..
what is your strategy in this case?
avatar
j*d
2
偶高中同学(国内的)让俺帮着改一篇英文paper,意思就是把语言改的更地道点,要
发表在CARBON
上。但是俺是aerospace行当的,没看过化学专业的paper。偶同学的paper通篇都是过
去式,尤其是
在experimental这一节。
是不是化学专业的paper在描述实验数据、结果或是过程的时候都是用过去式呢?学术
文章,至少在
aerospace一般都是用的现在式,不想想当然的把人家的时态给改了,恳请这个版块上
的专家给偶这个
外行指点一下迷津。谢谢了先,大牛请轻拍砖。
avatar
g*g
3
Use an embeded DB for testing purpose, clean and populate test data for
each test case.

【在 c******n 的大作中提到】
: our previous developers just use our one and only single QA db, and assume
: that the content is so and so, but over time, the content changes, so the
: test cases all gradually fail..
: what is your strategy in this case?

avatar
S*n
4
对,实验都已经做完了,所以是过去式,结论可以用现在式

【在 j*****d 的大作中提到】
: 偶高中同学(国内的)让俺帮着改一篇英文paper,意思就是把语言改的更地道点,要
: 发表在CARBON
: 上。但是俺是aerospace行当的,没看过化学专业的paper。偶同学的paper通篇都是过
: 去式,尤其是
: 在experimental这一节。
: 是不是化学专业的paper在描述实验数据、结果或是过程的时候都是用过去式呢?学术
: 文章,至少在
: aerospace一般都是用的现在式,不想想当然的把人家的时态给改了,恳请这个版块上
: 的专家给偶这个
: 外行指点一下迷津。谢谢了先,大牛请轻拍砖。

avatar
c*n
5
but since the data is a HUGE (probably 300 nodes ) object graph,
probably inserting just one entry in a table would require us to put in
all the associated objects , constrained by foreign keys.
essentially we'd have to keep the entire DB dump for every release of the
test code.
true, this db dump can be very small, for derby or something

【在 g*****g 的大作中提到】
: Use an embeded DB for testing purpose, clean and populate test data for
: each test case.

avatar
j*d
6
谢谢!
avatar
g*g
7
Populate just enough data for testing purpose, you don't need to
maintain the test data between tests, that's what a unit test
is supposed to be. If that's not feasible, you are looking into
external DB depnedency and integration test instead.

【在 c******n 的大作中提到】
: but since the data is a HUGE (probably 300 nodes ) object graph,
: probably inserting just one entry in a table would require us to put in
: all the associated objects , constrained by foreign keys.
: essentially we'd have to keep the entire DB dump for every release of the
: test code.
: true, this db dump can be very small, for derby or something

avatar
c*n
8
actually sometimes we need to go back to a previous version (back out some
changes), then if you don't keep the data source (a db dump ) in svn, when
you back out later changes, the old tests will fail

【在 g*****g 的大作中提到】
: Populate just enough data for testing purpose, you don't need to
: maintain the test data between tests, that's what a unit test
: is supposed to be. If that's not feasible, you are looking into
: external DB depnedency and integration test instead.

avatar
g*g
9
That's why you keep the schema and the data with the tests.
Different tests can use different schema and data if you wish.

【在 c******n 的大作中提到】
: actually sometimes we need to go back to a previous version (back out some
: changes), then if you don't keep the data source (a db dump ) in svn, when
: you back out later changes, the old tests will fail

avatar
S*h
10
There is a tool called dbunit. It can export the data (maybe also schema)
from database as xml and repopulate the database. Probably it can stand
for some schema change. http://www.dbunit.org/. It might be useful for you.

【在 c******n 的大作中提到】
: our previous developers just use our one and only single QA db, and assume
: that the content is so and so, but over time, the content changes, so the
: test cases all gradually fail..
: what is your strategy in this case?

avatar
c*n
11
pretty neat, thanks!

【在 S****h 的大作中提到】
: There is a tool called dbunit. It can export the data (maybe also schema)
: from database as xml and repopulate the database. Probably it can stand
: for some schema change. http://www.dbunit.org/. It might be useful for you.

avatar
r*s
12
理论上是个好办法,
实践上
maintaining the seed data is a headache,
especially with multiple types of dbs.
adding another db, like derby, becomes
a burden to both devs and dba, what made
it worse was that derby differs from other
dbs like mysql in some behaviors
(transaction? i forgot) and thus the unit tests
thread with the embedded db were evetually
abandoned.

【在 g*****g 的大作中提到】
: Use an embeded DB for testing purpose, clean and populate test data for
: each test case.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。