On 03/26/2012 03:34 AM, Henrik Ingo wrote:
Hi Mohit

Let's add the list and especially Patrcik to answer this question
authoritatively.

What you describe is correct. It seem the test-run program essentially
runs a diff against the real output and the .result file and if the
diff is non-empty then the result fails.

Yes, this is correct. .test files contain 'what to do' while the .result lists 'what should be output'. Any difference between actual and expected results = failure + diff showing where things diverged.

I generally updates tests by tinkering with the .test file then using the --record option to mtr to re-record the .result file. Manual edits are very prone to error. You should do bzr diff to see what changed in the .result file. - http://docs.drizzle.org/testing/test-run.html#options-for-test-case-authoring

One should also ideally run things through param-build as I see (and have been guilty of) test changes that work on one machine but do not work generically (server url sounds like it would need some masking, etc to be 'run-anywhere', but I might be mistaken).

Hope this helps,
Patrick

In my experience, if you edit or add tests, it is not realistic that
you would be able to create a result file by hand that will make the
test pass. What I usually do is add new tests, then run the test and
get the reject file. I then apply exactly that diff (usually by hand,
but you could of course try the "patch" utility directly) and rerun
this until it passes.

henrik



On Mon, Mar 26, 2012 at 10:27 AM, Mohit Srivastava
<[email protected]>  wrote:
Hi Henrik,

How was your weekend ?

Either I am unable to understand the test case working scenario or its
really fails.

There are two files basic.test(where the test script is written) and
basic.result(result corresponding to basic.test). And after execution of
basic.test , the result are cross check with the basic.result. And here
defines the fail or pass. Correct me if I am wrong ?

I changes few things in basic.test and basic.result like url of server. and
the results corresponding to test. But it fails and generates a basic
.reject file.

---
Mohit




_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to