How UVM knows "my_test" class? why/where do we need to import "my_pkg::*" that holds the class "my_test"?

In reply to uriyam:

You have to import my_testbench_pkg because it contains your testbench topology including the definition of the class “my_test”.