Hierarchical reference name component lookup failed for 'uvm_test_top'

In reply to dave_59:

If it is only a string name, how can we reference/read/write a variable to/from a component?

For example, in my testcase, I would like to dynamically change the value of a variable.
If uvm_test_top is not the name of uvm_test instance variable, then this code below will not work. So how can I set the variable without using uvm_config_db?


// From testcase
uvm_test_top.env_o.config.varA = 10;