Gatling multi user script executed suceesfully but no update in DB, the same wokrs perfectly fine for a single session

Hello Gatling Experts,

Can you please help with the following -

I’m trying to create a post in test site using the following code. This works fine for a single user session. However the script doesn’t create post when multiple users are used. There are no errors/exceptions that i can see.
Attached is the full script with debug log.
Could you please point me in right direction.

Thanks
Jhansi

Here is the code snippet -

object CreatePost
{
val feeder = csv(“Formdata.csv”).random
val post = exec(http(“post_page”)
.get(instance + “”"/wp-admin/edit.php""")
.headers(headers_0)
.resources(
http(“request_12”)
.get(npBlog + “”"/wp-admin/post-new.php""")
.headers(headers_0),
http(“request_13”)
.get(npBlog + “”"/wp-includes/js/thickbox/thickbox.css?ver=20090514"""),
http(“request_14”)
.get(npBlog + “”"/wp-includes/js/tinymce/langs/wp-langs-en.js?ver=327-1235""")
.headers(headers_14),
http(“request_16”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=327-1235"""),
http(“request_17”)
.get(npBlog + “”"/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=327-1235"""),
http(“request_19”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=327-1235"""),
http(“request_20”)
.get(npBlog + “”"/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=327-1235"""),
http(“request_21”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=327-1235"""),
http(“request_22”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/media/css/content.css?ver=327-1235""")))
.pause(5)
.feed(feeder)
.exec(http(“autoSave”)
.post(instance + “”"/wp-admin/admin-ajax.php""")
.headers(headers_23)
.formParam(""“action”"", “”“autosave”"")
.formParam(""“post_ID”"", “”"-1409845277""")
.formParam(""“autosavenonce”"", “”“280174f00e”"")
.formParam(""“post_type”"", “”“post”"")
.formParam(""“autosave”"", “”“1"”")
.formParam(""“content”"", “”"""")
.formParam(""“catslist”"", “”"""")
.formParam(""“comment_status”"", “”“open”"")
.formParam(""“ping_status”"", “”“open”"")
.formParam(""“excerpt”"", “”"""")
.formParam(""“post_author”"", “”"""")
.formParam(""“user_ID”"", “”“2"”")
.formParam(""“temp_ID”"", “”"-1409845277""")
.resources(http(“request_24”)
.post(npBlog + “”"/wp-admin/admin-ajax.php""")
.headers(headers_24)
.formParam(""“action”"", “”“autosave-generate-nonces”"")
.formParam(""“autosavenonce”"", “”“280174f00e”"")
.formParam(""“post_type”"", “”“post”""),
http(“request_25”)
.post(npBlog + “”"/wp-admin/admin-ajax.php""")
.headers(headers_23)
.formParam(""“action”"", “”“sample-permalink”"")
.formParam(""“new_title”"", “${postTitle}”)
.formParam(""“samplepermalinknonce”"", “”“4c8c45d03a”"")))
.pause(6)
.exec(http(“request_26”)
.get(instance + “”"/wp-admin/images/button-grad-active.png""")
.headers(headers_2)
.resources(http(“request_27”)
.post(npBlog + “”"/wp-admin/post.php""")
.headers(headers_0)
.formParam("""_wpnonce""", “”“aa38f02518"”")
.formParam(""“user_ID”"", “”“2"”")
.formParam(""“action”"", “”“editpost”"")
.formParam(""“originalaction”"", “”“post”"")
.formParam(""“post_author”"", “”"""")
.formParam(""“post_type”"", “”“post”"")
.formParam(""“original_post_status”"", “”“draft”"")
.formParam(""“wp-preview”"", “”"""")
.formParam(""“hidden_post_status”"", “”“draft”"")
.formParam(""“post_status”"", “”“draft”"")
.formParam(""“hidden_post_password”"", “”"""")
.formParam(""“hidden_post_visibility”"", “”“public”"")
.formParam(""“visibility”"", “”“public”"")
.formParam(""“post_password”"", “”"""")
.formParam(""“original_publish”"", “”“Publish”"")
.formParam(""“publish”"", “”“Publish”"")
.formParam(""“tax_input[post_tag]”"", “”"""")
.formParam(""“newtag[post_tag]”"", “”"""")
.formParam(""“newcat”"", “”“New category name”"")
.formParam(""“newcat_parent”"", “”"-1""")
.formParam("""_ajax_nonce""", “”“adae22ef33"”")
.formParam(""“post_title”"", “${postTitle}”)
.formParam(""“content”"", “${postContent}”)
.formParam(""“autosavenonce”"", “”“280174f00e”"")
.formParam(""“closedpostboxesnonce”"", “”“d951b93bed”"")
.formParam(""“getpermalinknonce”"", “”“490c94fd8a”"")
.formParam(""“samplepermalinknonce”"", “”“4c8c45d03a”"")
.formParam(""“meta-box-order-nonce”"", “”“5a000c1fe5"”")
.formParam(""“excerpt”"", “”"""")
.formParam(""“trackback_url”"", “”"""")
.formParam(""“metakeyinput”"", “”"""")
.formParam(""“metavalue”"", “”"""")
.formParam("""_ajax_nonce""", “”“16378616d5"”")
.formParam(""“advanced_view”"", “”“1"”")
.formParam(""“comment_status”"", “”“open”"")
.formParam(""“ping_status”"", “”“open”"")
.formParam(""“post_name”"", “${postTitle}”),
http(“request_28”)
.get(npBlog + “”"/wp-includes/js/thickbox/thickbox.css?ver=20090514"""),
http(“request_29”)
.get(npBlog + “”"/wp-admin/css/colors-fresh.css?ver=20091217"""),
http(“request_30”)
.get(npBlog + “”"/wp-admin/css/mu.css?version=2.9.2"""),
http(“request_31”)
.get(npBlog + “”"/wp-includes/js/tinymce/langs/wp-langs-en.js?ver=327-1235""")
.headers(headers_14),
http(“request_32”)
.get(npBlog + “”"/wp-admin/admin-ajax.php?action=wp-compression-test&test=1&1409845290860""")
.headers(headers_0),
http(“request_33”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=327-1235"""),
http(“request_34”)
.get(npBlog + “”"/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=327-1235"""),
http(“request_35”)
.get(npBlog + “”"/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=327-1235"""),
http(“request_36”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=327-1235"""),
http(“request_37”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=327-1235"""),
http(“request_38”)
.get(npBlog + “”"/wp-includes/js/tinymce/plugins/media/css/content.css?ver=327-1235"""),
http(“request_39”)
.get(npBlog + “”"/wp-admin/admin-ajax.php?action=wp-compression-test&test=no&1409845290956""")
.headers(headers_0))
)

}

val users = scenario(“newPost”).exec(Login.login1, CreatePost.post)

setUp(
users.inject
(rampUsersPerSec(1) to (3) during (10 seconds))
).protocols(httpProtocol)
.maxDuration(20 seconds)

// setUp(users.inject(atOnceUsers(1))).protocols(httpProtocol)

newPost.scala (9.44 KB)

multi.log (619 KB)

You seem to be having nonce mechanisms in your application and the values you pass are hardcoded.
There’s a very good chance you can’t replay them like you’re doing, and you have to capture them from the previous response.