how to call jQuery in admin as well as in homepage

function test(){
    wp_enqueue_script('myscript', plugin_dir_url(__FILE__). 'js/test.js',array('jquery'));
}
add_action('admin_print_scripts','test');
add_action('wp_head','test');