Import Dummy Content and Post Thumbnails

wp_insert_post() return the ID of the post if the post is successfully added to the database. Save this ID in variable, and than create foreach images if you want to attach the same images for each post.

Try something like this:

http://pastebin.com/kGu4ZpBi