1

Topic: Logic testing

The question  - whether is at you testing of logic  and triggers? And if yes, as/on than?
Example: is  which with the specified input parameters does update in five tables, removal in three and an insertion in one. After change , it is necessary to check up that the affected tables remained the same.

2

Re: Logic testing

CyberMax> After change , it is necessary to check up that the affected tables remained the same.
In sense, "changed as it is necessary"?
P.S. As, as... The Functional tests on
Synthetic (or a piece real) the data.

3

Re: Logic testing

CyberMax;
Is. It is used small   on a python. On an input accepts a file in a format json with instructions what requests to fulfill and what to expect result. Result can be not only number/line, but also an error and equality ("field1 = field2) and an inequality (" id> 0 ").

4

Re: Logic testing

miwaonline> what to expect the result. Result can be not only number/line;
miwaonline> but also an error and equality ("field1 = field2) and an inequality (" id> 0 ").
Well i.e. DML-procedure to it not to check up...

5

Re: Logic testing

Gadzhimuradov Rustam;
Quite to itself it is possible to check up result of performance. If I correctly understood CyberMax-a, he should be convinced that after performance of procedure the data in tables corresponds to the expected. Actually, for performance (including) similar tasks it also is used.

6

Re: Logic testing

CyberMax, what you mean under "the affected tables remained the same"? It will be convinced, what dependences remained the same?

7

Re: Logic testing

rdb_dev wrote:

CyberMax, what you mean under "the affected tables remained the same"?

That other tables have not been changed and that the composition changed tables remained the same.

8

Re: Logic testing

miwaonline> quite to itself it is possible to check up Result of performance.
miwaonline> the data in tables corresponds to the expected.
And how you will transfer a data set (and the more so a little) in the script?
CyberMax> That other tables have not been changed
to check that other tables are not changed, it is any marasmus.
And here to check the data (well and connectivity if it would be desirable manually) without them
Copies or one more /EB/ (script) it is unreal. And is easier
Simply to check two (lists)  among themselves.

9

Re: Logic testing

CyberMax wrote:

it is passed...
That other tables have not been changed and that the composition changed tables remained the same.

As the composition of tables can remain the same if in logic  change of tables is put - "does update in five tables, removal in three and an insertion in one"? The test for a regression is necessary to you? Take two identical bases, in one run an old script, and in another new, then make sampling of these bases and compare results (naturally program). Certainly, such comparing does not give 100 % of a warranty of absence of a regression, but though something...

10

Re: Logic testing

wrote:

miwaonline> Result of performance quite to itself it is possible to check up Rustam.
miwaonline> the data in tables corresponds to the expected.
And how you will transfer a data set (and the more so a little) in the script?

In an any way: it is possible to fulfill a sql-script before test start, it is possible bash/python/cmd. It is possible  in test necessary given to import:

{
"id": "001";
"name": "first test";
"author": "developer";
"description": "This is description of a test.";
"data_files": ["test1-1.sql", "test1-2.sql"];
"test_files": ["test1.sh", "test1.py"];
"test_statements":
[
{"sql": "insert into t1 (a, b, c) values (1,2,3)"};
{"sql": "execute procedure p1"};
{"sql": "select an as t1, b as t2, c as t3 from t1",
"expect_values": {"t1": "1"};
"expect_equals": ["t1", "t2", "t3"]
}
]
}

The script on  rolls: https://github.com/miwaonline/fdbtest Truth it was written for the internal use so with design and the documentation all is bad. But if , real examples I can outline. And the code there not especially difficult.