-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add v1.1 test #112
base: master
Are you sure you want to change the base?
add v1.1 test #112
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# language: en | ||
Feature: select_by_id hugeGraph's gremlin-collections | ||
|
||
@lxb | ||
Scenario Outline: select_by_id query_collections -- <scene> | ||
When select_by_id query_collections -- 127.0.0.1:8088 | ||
Given select_by_id query_collections | ||
Then select_by_id query_collections -- <ass> | ||
Examples: | ||
| scene | ass | | ||
| 查询单条语句 | {"status":200,"message":"None} | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# language: en | ||
Feature: update hugeGraph's gremlin-collections | ||
|
||
@lxb | ||
Scenario Outline: update query_collections -- <scene> | ||
When update query_collections -- 127.0.0.1:8088 | ||
Given update query_collections -- <action> | ||
Then update query_collections -- <ass> | ||
Examples: | ||
| scene | action |ass | | ||
| 更新收藏name改变 | update_name |{"status":200, "message":"None"} | | ||
| 更新收藏content改变 | update_content |{"status":200, "message":"None"} | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# language: en | ||
Feature: delete hugeGraph's query_collections | ||
|
||
@lxb | ||
Scenario Outline: delete query_connections -- <scene> | ||
When delete query_connections -- 127.0.0.1:8088 -- <param> | ||
Given delete query_connections | ||
Then delete query_connections -- <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| 删除收藏语句 | page_no=1&page_size=50 | {"status":200,"message":"None"} | | ||
|
||
|
||
|
||
|
||
|
||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# language: en | ||
Feature: select hugeGraph's execute_records | ||
|
||
@lxb | ||
Scenario Outline: select execute_records -- <scene> | ||
When select execute_records -- 127.0.0.1:8088 | ||
Given select execute_records -- <param> | ||
Then select execute_records -- <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| page_size默认首页 | page_no=1 | {"status":200, "page_size":10, "page_no":1} | | ||
| page_size默认尾页 | page_no=2 | {"status":200, "page_size":10, "page_no":2} | | ||
| page_size && page_no默认 | null | {"status":200, "page_size":10, "page_no":1} | | ||
| page_size>条数首页 | page_size=16&page_no=1 | {"status":200, "page_size":16, "page_no":1} | | ||
| page_size<=条数首页 | page_size=3&page_no=1 | {"status":200, "page_size":3, "page_no":1} | | ||
| page_size<条数尾页 | page_size=3&page_no=2 | {"status":200, "page_size":3, "page_no":2} | | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# language: en | ||
Feature: delete hugeGraph's execute_records | ||
|
||
@lxb | ||
Scenario Outline: delete execute_records -- <scene> | ||
When delete execute_records -- 127.0.0.1:8088 -- <select_param> | ||
Given delete execute_records | ||
Then delete execute_records -- <ass> | ||
Examples: | ||
| scene | select_param | ass | | ||
| 正例(删除) | page_size=100&page_no=1 | {"status":200,"data_status":"SUCCESS"} | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# language: en | ||
Feature: add hugeGraph's connections | ||
|
||
@lxb | ||
Scenario Outline: add connections -- <scene> | ||
When add connections -- request_host: 127.0.0.1:8088 | ||
Given add connections -- param: <param> | ||
Then add connections -- compare_assert: <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| user不存在 | { "name": "hugegraph3_abnormal","graph" : "hugegraph3","host" : "127.0.0.1","port" : 8081,"password":"9fd95c9c-711b-415b-b85f-d4df46ba5c31"} | {"status":400, "message":""} | | ||
| user为空 | { "name": "hugegraph3_abnormal","graph" : "hugegraph3","host" : "127.0.0.1","port" : 8081,"username":"","password":"9fd95c9c-711b-415b-b85f-d4df46ba5c31"} | {"status":400, "message":""} | | ||
| password不存在 | { "name": "hugegraph3_abnormal","graph" : "hugegraph3","host" : "127.0.0.1","port" : 8081,"username":"hugegraph3"} | {"status":400, "message":""} | | ||
| password为空 | { "name": "hugegraph3_abnormal","graph" : "hugegraph3","host" : "127.0.0.1","port" : 8081,"username":"hugegraph3","password":""} | {"status":400, "message":""} | | ||
| name不存在 | { "graph" : "hugegraph1","host" : "127.0.0.1","port" : 8080} | {"status":400, "message":"参数 name 不能为 null 或空"} | | ||
| name为空 | { "name": "","graph" : "hugegraph1","host" : "127.0.0.1","port" : 8080} | {"status":400, "message":"参数 name 不能为 null 或空"} | | ||
| graph不存在 | { "name": "hugegraph1_abnormal","host" : "127.0.0.1","port" : 8080} | {"status":400, "message":"参数 graph 不能为 null 或空"} | | ||
| graph为空 | { "name": "hugegraph1_abnormal","graph" : "","host" : "127.0.0.1","port" : 8080} | {"status":400, "message":"参数 graph 不能为 null 或空"} | | ||
| host不存在 | { "name": "hugegraph1_abnormal","graph" : "hugegraph1","port" : 8080 } | {"status":400, "message":"参数 host 不能为 null 或空"} | | ||
| host为空 | { "name": "hugegraph1_abnormal","graph" : "hugegraph1","host" : "","port" : 8080 } | {"status":400, "message":"参数 host 不能为 null 或空"} | | ||
| port不存在 | { "name": "hugegraph1_abnormal","graph" : "hugegraph1","host" : "127.0.0.1"} | {"status":400, "message":"参数 port 不能为 null"} | | ||
| port为空 | { "name": "hugegraph1_abnormal","graph" : "hugegraph1","host" : "127.0.0.1","port" : ""} | {"status":400, "message":"参数 port 不能为 null"} | | ||
### set dataset | ||
| 正例(user不存在,password不存在) | { "name": "hugegraph1_ip","graph" : "hugegraph1","host" : "127.0.0.1","port" : 8080} | {"status":200,"message":"None"} | | ||
| 正例(user不存在,password不存在) | { "name": "hugegraph1_host","graph" : "hugegraph1","host" : "localhost","port" : 8080} | {"status":200,"message":"None"} | | ||
| 正例(user不存在,password不存在) | { "name": "hugegraph2_ip","graph" : "hugegraph2","host" : "127.0.0.1","port" : 8080} | {"status":200,"message":"None"} | | ||
| 正例(user不存在,password不存在) | { "name": "hugegraph2_host","graph" : "hugegraph2","host" : "localhost","port" : 8080} | {"status":200,"message":"None"} | | ||
| 正例(user存在,password存在) | { "name": "hugegraph3_ip","graph" : "hugegraph3","host" : "127.0.0.1","port" : 8081,"username":"hugegraph3","password":"9fd95c9c-711b-415b-b85f-d4df46ba5c31"} | {"status":200,"message":"None"} | | ||
| 正例(user存在,password存在) | { "name": "hugegraph3_host","graph" : "hugegraph3","host" : "localhost","port" : 8081,"username":"hugegraph3","password":"9fd95c9c-711b-415b-b85f-d4df46ba5c31"} | {"status":200,"message":"None"} | | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Comment on lines
+31
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# language: en | ||
Feature: select hugeGraph's connections | ||
|
||
@lxb | ||
Scenario Outline: select connections -- <scene> | ||
When select connections -- request_host: 127.0.0.1:8088 | ||
Given select connections -- param: <param> | ||
Then select connections -- compare_assert: <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| cotent字段搜索(图ID) | content=20 | {"status":200,"content":"id","id":1000} | | ||
| cotent字段搜索(图名) | page_no=1&page_size=10&content=hugegraph1 | {"status":200,"content":"name","name":"hugegraph1"} | | ||
| graph_order字段为desc | page_no=1&page_size=10&graph_order=desc | {"status":200,"graph_order":"desc"} | | ||
| graph_order字段为asc | page_no=1&page_size=10&graph_order=asc | {"status":200,"graph_order":"asc"} | | ||
| 默认排序 | page_no=1&page_size=10 | {"status":"200","graph_order":"default"} | | ||
| 所有字段不存时 | null | {"status":200,"default":"all"} | | ||
| page_size大于等于图链接数,查看首页 | page_no=1&page_size=10 | {"status":200, "page_no":1, "page_size":10} | | ||
| page_size小于图链接数,查看首页 | page_no=1&page_size=3&content=hugegraph1 | {"status":200, "page_no":1, "page_size":3} | | ||
| page_size小于图链接数,查看尾页 | page_no=2&page_size=3&content=hugegraph1 | {"status":200, "page_no":2, "page_size":3} | | ||
| 所有字段都存在时 | page_no=1&page_size=10&content=hugegraph1&graph_order=asc | {"status":200} | | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# language: en | ||
Feature: update hugeGraph's connections | ||
|
||
@lxb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove it |
||
Scenario Outline: update connections -- <scene> | ||
When update connections -- request_host: 127.0.0.1:8088 | ||
Given update connections | ||
Then update connections -- <ass> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rename ass |
||
Examples: | ||
| scene | ass | | ||
| 更新name | {"status":200, "message":"None"} | | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# language: en | ||
Feature: select hugeGraph's query | ||
|
||
@lxb | ||
Scenario Outline: select gremlin_query -- <scene> | ||
When select gremlin_query -- 127.0.0.1:8088 | ||
Given select gremlin_query -- <scene> -- <param> | ||
Then select gremlin_query -- <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| 创建property_key | {"connection_id":0, "content": "graph.schema().propertyKey('name').asText().ifNotExist().create()\n graph.schema().propertyKey('age').asInt().ifNotExist().create() \n graph.schema().propertyKey('city').asText().ifNotExist().create() \n graph.schema().propertyKey('lang').asText().ifNotExist().create() \n graph.schema().propertyKey('date').asText().ifNotExist().create() \n graph.schema().propertyKey('price').asInt().ifNotExist().create()"} | {"status":200,"message":"None"} | | ||
| 创建vertex_label | {"connection_id":0, "content": "person = graph.schema().vertexLabel('person').properties('name', 'age', 'city').primaryKeys('name').ifNotExist().create() \n software = graph.schema().vertexLabel('software').properties('name', 'lang', 'price').primaryKeys('name').ifNotExist().create()"} | {"status":200,"message":"None"} | | ||
| 创建edge_label | {"connection_id":0, "content": "knows = graph.schema().edgeLabel('knows').sourceLabel('person').targetLabel('person').properties('date').ifNotExist().create() \n created = graph.schema().edgeLabel('created').sourceLabel('person').targetLabel('software').properties('date', 'city').ifNotExist().create()"} | {"status":200,"message":"None"} | | ||
| 创建vertex & edge | {"connection_id":0, "content": "marko = graph.addVertex(T.label, 'person', 'name', 'marko', 'age', 29, 'city', 'Beijing') \n vadas = graph.addVertex(T.label, 'person', 'name', 'vadas', 'age', 27, 'city', 'Hongkong') \n lop = graph.addVertex(T.label, 'software', 'name', 'lop', 'lang', 'java', 'price', 328) \n josh = graph.addVertex(T.label, 'person', 'name', 'josh', 'age', 32, 'city', 'Beijing') \n ripple = graph.addVertex(T.label, 'software', 'name', 'ripple', 'lang', 'java', 'price', 199) \n peter = graph.addVertex(T.label, 'person','name', 'peter', 'age', 29, 'city', 'Shanghai') \n marko.addEdge('knows', vadas, 'date', '20160110') \n marko.addEdge('knows', josh, 'date', '20130220') \n marko.addEdge('created', lop, 'date', '20171210', 'city', 'Shanghai') \n josh.addEdge('created', ripple, 'date', '20151010', 'city', 'Beijing') \n josh.addEdge('created', lop, 'date', '20171210', 'city', 'Beijing') \n peter.addEdge('created', lop, 'date', '20171210', 'city', 'Beijing')"} | {"status":200,"message":"None"} | | ||
| 正例查询 | {"connection_id":0, "content":"g.V().limit(20)"} | {"status":200,"message":"None"} | | ||
|
||
| connection_id字段不存在 | { "content":"g.V().limit(10)"} | {"status":400, "message":"None"} | | ||
| connection_id字段错误 | {"connection_id":0, "content":"g.V().limit(10)"} | { "status":400, "message":"查找 id 为 0 的图连接失败" } | | ||
| content字段为空 | {"connection_id":0, "content":""} | {"status":400, "message":"参数 gremlin-query.content 不能为 null 或空"} | | ||
| content字段不存在 | {"connection_id":0} | {"status":400, "message":"参数 gremlin-query.content 不能为 null 或空"} | | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# language: en | ||
Feature: select hugeGraph's filter_vertices | ||
|
||
@lxb | ||
Scenario Outline: neighbor_vertices -- <scene> | ||
When neighbor_vertices -- 127.0.0.1:8088 | ||
Given neighbor_vertices -- <scene> -- <param> | ||
Then neighbor_vertices -- <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| 正例 | {"connection_id":0, "vertex_id":"1:josh", "vertex_label": "person"} | {"status":200, "message":"None"} | | ||
| connection_id字段不存在 | {"vertex_id":"1:josh","vertex_label": "person"} | {"status":400, "message":"None"} | | ||
| connection_id字段错误 | {"connection_id":0, "vertex_id":"1:josh","vertex_label": "person"} | { "status":400, "message":"查找 id 为 0 的图连接失败" } | | ||
| content字段为空 | {"connection_id":0, "vertex_id":"","vertex_label": "person"} | {"status":200,"message":"None"} | | ||
| content字段不存在 | {"connection_id":0,"vertex_label": "person"} | {"status":400, "message":"参数 vertex_id 不能为 null"} | | ||
| vertex_label字段为空 | {"connection_id":0, "vertex_id":"1:josh", "vertex_label": ""} | {"status":400, "message":"None"} | | ||
| vertex_label字段不存在 | {"connection_id":0, "vertex_id":"1:josh"} | {"status":400, "message":"None"} | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# language: en | ||
Feature: select hugeGraph's filter_vertices_query | ||
|
||
@lxb | ||
Scenario Outline: filter_vertices_query -- <scene> | ||
When filter_vertices_query -- 127.0.0.1:8088 | ||
Given filter_vertices_query -- <scene> -- <param> | ||
Then filter_vertices_query -- <ass> | ||
Examples: | ||
| scene | param | ass | | ||
| 正例 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| connection_id字段不存在 | {"vertex_label":"person", "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":400, "message":"None"} | | ||
| connection_id字段错误 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | { "status":400, "message":"查找 id 为 0 的图连接失败" } | | ||
| vertex_id字段错误 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko_error", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| vertex_id字段不存在 | {"vertex_label":"person", "connection_id":0, "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":400, "message":"参数 vertex_id 不能为 null"} | | ||
| direction字段不存在 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| direction为BOTH | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "BOTH", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| direction为OUT | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| direction为IN| {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "IN", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| conditions字段不存在 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows"} | {"status":200, "message":"None"} | | ||
| conditions字段为空 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": []} | {"status":200, "message":"None"} | | ||
| edge_label字段为空 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":400, "message":"Gremlin 执行失败,详细信息: Edge label name can't be empty"} | | ||
| edge_label字段不存在 | {"vertex_label":"person", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":200, "message":"None"} | | ||
| vertex_label字段为空 | {"vertex_label":"", "connection_id":0, "vertex_id":"1:marko", "direction": "OUT", "edge_label": "knows", "conditions": [{"key": "name", "operator": "gt", "value": 0.1}]} | {"status":400, "message":"None"} | | ||
| vertex_label字段不存在 | {"connection_id":25, "vertex_id":5, "direction": "IN", "conditions": [{"key": "weight", "operator": "gt", "value": 0.1}]} | {"status":400, "message":"参数 vertex_label 不能为 null"} | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# language: en | ||
Feature: delete hugeGraph's connections | ||
|
||
@lxb | ||
Scenario Outline: delete hugeGraph's connections -- <scene> | ||
When delete hugeGraph's connections -- 127.0.0.1:8088 | ||
Given delete hugeGraph's connections | ||
Then delete hugeGraph's connections -- <ass> | ||
Examples: | ||
| scene | ass | | ||
| 删除图链接 | {"status":200, "message":"None"} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove the blank lines