No component instantiated

In reply to chr_sue:

Thank you a lot.I have run the code in the link that you have shared ,it works but when I run in my environment (Questasim) it does not work ,it gives
UVM_WARNING @ 0: reporter [BDTYP] Cannot create a component of type ‘lpi_basic_test’ because it is not registered with the factory.

UVM_FATAL @ 0: reporter [INVTST] Requested test from call to run_test(lpi_basic_test) not found.

It is the same error when i have used the testbench from the book .please , do you have any idea how to solve it ?