Updated on 2024-04-25 GMT+08:00

Database: MongoDBInsert

This system keyword is used to insert documents into collections in the MongoDB database.

Parameter

Mandatory

Type

Description

Ip

Yes

String

Database IP address

Port

Yes

Integer

Database port

User Name

Yes

String

Username

Password

Yes

String

Password (The login password is personal information and must be defined as sensitive in the environment parameters.)

DB Name

Yes

String

Database instance name

Collection

Yes

String

Collection name

Bson

Yes

String

Inserted data (in BSON format)

MongoDBInsert Response

Status: success

Parameter

Type

Description

affected_row_count

Integer

Number of rows affected by document insertion

MongoDBInsert Response Example

{
  "affected_row_count" : 1
}

MongoDBInsert Usage Example

Insert data into a collection based on the input test parameter. The system keyword returns the number of inserted records.

Check whether the result is successful through the test checkpoint.