@@ -6,31 +6,34 @@ Feature: Elasticsearch Operations Testing
66
77 Background :
88 Given an Elasticsearch cluster is running
9- And index "test-index" exists
109 And document type "test-doc" is configured for index "test-index"
1110
1211 Scenario : Index a new document synchronously
1312 Given a valid Elasticsearch client connection
13+ And index "test-index" exists
1414 When I index a document with id "1" and content '{"title": "Test Document", "content": "This is a test"}' into "test-index"
1515 Then the indexing operation should succeed
1616 And the document should be retrievable by id "1" from "test-index"
1717
1818 Scenario : Search for documents synchronously
1919 Given a valid Elasticsearch client connection
20+ And index "test-index" exists
2021 And a document exists in "test-index" with id "1" and content '{"title": "Test Document", "content": "This is a test"}'
2122 When I search for "Test Document" in "test-index"
2223 Then the search should return at least 1 hit
2324 And the hit should contain field "title" with value "Test Document"
2425
2526 Scenario : Update a document synchronously
2627 Given a valid Elasticsearch client connection
28+ And index "test-index" exists
2729 And a document exists in "test-index" with id "1" and content '{"title": "Test Document", "content": "This is a test"}'
28- When I update document "1" in "test-index" with content '{"title": "Updated Document", "content": "This is an update"}'
30+ When I update document "1" in "test-index" with content '{"doc": {" title": "Updated Document", "content": "This is an update"} }'
2931 Then the update operation should succeed
3032 And the document should reflect the updated content when retrieved
3133
3234 Scenario : Delete a document synchronously
3335 Given a valid Elasticsearch client connection
36+ And index "test-index" exists
3437 And a document exists in "test-index" with id "1" and content '{"title": "Test Document", "content": "This is a test"}'
3538 When I delete document "1" from "test-index"
3639 Then the delete operation should succeed
@@ -51,6 +54,8 @@ Feature: Elasticsearch Operations Testing
5154
5255 Scenario : Perform bulk operations synchronously
5356 Given a valid Elasticsearch client connection
57+ And index "test-index" exists
58+ And a document exists in "test-index" with id "1" and content '{"title": "Test Document", "content": "This is a test"}'
5459 When I perform a bulk operation with:
5560 | action | id | index | document |
5661 | index | 2 | test -index | {"title ": "Doc 2 ", "content ": "Second "} |
@@ -63,13 +68,15 @@ Feature: Elasticsearch Operations Testing
6368 @async
6469 Scenario : Index a new document asynchronously
6570 Given a valid Elasticsearch client connection
71+ And index "test-index" exists
6672 When I index a document with id "10" and content '{"title": "Async Doc", "content": "Async test"}' into "test-index"
6773 Then the indexing operation should succeed
6874 And the document should be retrievable by id "10" from "test-index"
6975
7076 @async
7177 Scenario : Search for documents asynchronously
7278 Given a valid Elasticsearch client connection
79+ And index "test-index" exists
7380 And a document exists in "test-index" with id "10" and content '{"title": "Async Doc", "content": "Async test"}'
7481 When I search for "Async Doc" in "test-index"
7582 Then the search should return at least 1 hit
@@ -78,14 +85,16 @@ Feature: Elasticsearch Operations Testing
7885 @async
7986 Scenario : Update a document asynchronously
8087 Given a valid Elasticsearch client connection
88+ And index "test-index" exists
8189 And a document exists in "test-index" with id "10" and content '{"title": "Async Doc", "content": "Async test"}'
82- When I update document "10" in "test-index" with content '{"title": "Updated Async", "content": "Updated async"}'
90+ When I update document "10" in "test-index" with content '{"doc": {" title": "Updated Async", "content": "Updated async"} }'
8391 Then the update operation should succeed
8492 And the document should reflect the updated content when retrieved
8593
8694 @async
8795 Scenario : Delete a document asynchronously
8896 Given a valid Elasticsearch client connection
97+ And index "test-index" exists
8998 And a document exists in "test-index" with id "10" and content '{"title": "Async Doc", "content": "Async test"}'
9099 When I delete document "10" from "test-index"
91100 Then the delete operation should succeed
@@ -109,6 +118,8 @@ Feature: Elasticsearch Operations Testing
109118 @async
110119 Scenario : Perform bulk operations asynchronously
111120 Given a valid Elasticsearch client connection
121+ And index "test-index" exists
122+ And a document exists in "test-index" with id "10" and content '{"title": "Async Doc", "content": "Async test"}'
112123 When I perform a bulk operation with:
113124 | action | id | index | document |
114125 | index | 20 | test -index | {"title ": "Async 2 ", "content ": "Second "} |
@@ -122,4 +133,4 @@ Feature: Elasticsearch Operations Testing
122133 Given an Elasticsearch cluster with security enabled
123134 When I connect with username "elastic-user" and password "elastic-pass"
124135 Then the connection should be successful
125- And I should be able to perform operations on the cluster
136+ And I should be able to perform operations on the cluster
0 commit comments