diff --git a/python/plugins/processing/tests/testdata/expected/autoincrement_field.gml b/python/plugins/processing/tests/testdata/expected/autoincrement_field.gml
new file mode 100644
index 00000000000..7ea5c9e9a00
--- /dev/null
+++ b/python/plugins/processing/tests/testdata/expected/autoincrement_field.gml
@@ -0,0 +1,68 @@
+
+
+
+
+ 0-5
+ 83
+
+
+
+
+
+ 1,1
+ 0
+
+
+
+
+ 3,3
+ 1
+
+
+
+
+ 2,2
+ 2
+
+
+
+
+ 5,2
+ 3
+
+
+
+
+ 4,1
+ 4
+
+
+
+
+ 0,-5
+ 5
+
+
+
+
+ 8,-1
+ 6
+
+
+
+
+ 7,-1
+ 7
+
+
+
+
+ 0,-1
+ 8
+
+
+
diff --git a/python/plugins/processing/tests/testdata/expected/autoincrement_field.xsd b/python/plugins/processing/tests/testdata/expected/autoincrement_field.xsd
new file mode 100644
index 00000000000..d6770f6e562
--- /dev/null
+++ b/python/plugins/processing/tests/testdata/expected/autoincrement_field.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
index 9258a72d955..3d1e3403d4a 100644
--- a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
+++ b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
@@ -122,3 +122,14 @@ tests:
compare:
geometry:
precision: 7
+ - algorithm: qgis:addautoincrementalfield
+ name: Add autoincremental field
+ params:
+ INPUT:
+ name: points.gml
+ type: vector
+ results:
+ OUTPUT:
+ name: expected/autoincrement_field.gml
+ type: vector
+