$_getMyAttr = $_product->getResource()->getAttribute(‘my_attribute’);

// Get Value
$attrTestValue = $_getMyAttr->getFrontend()->getValue($_product);

// Get Label
$attrTestLabel = $_getMyAttr->getStoreLabel();
Important
Make sure “Visible on Product View Page on Front-end” and “Used in Product Listing” options under storefront Properties are set to Yes.