Your shortcode function will register widget, will not display on a page as a shortcode.
To show widget on a page/post you need to use the_widget( 'test_widget', $instance, $args );
function.
Codex documentation is here
For example, in your code
// Display the widget
function test_show_widget() {
the_widget( 'test_widget' );
}
add_shortcode('test_widget', 'test_show_widget');