Best way to create a user programatically

You should read the codex page re wp_create_user.

You don’t describe the context in which your code runs.
You shouldn’t need all those require_once calls.

Anyhow, in this line wp_new_user_notification ( testuser8,null,'both' ); what is testuser8 ? It’s not a variable, it’s not a string, it’s just some text that probably throws an error.

Try:

$user_id = wp_create_user ( 'testuser8', 'apsswd', '[email protected]' );
if( is_wp_error( $user_id ) ) 
    var_dump( $user_id );
else
    wp_new_user_notification ( $user_id, null,'both' );