No, we cannot get the test configuration in Visual Studio Test task, no such a predefined variable.
However we can get the test configuration via the REST API:
E.g:
Get a list of test configurations:
GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/fabrikam-fiber-tfvc/_apis/test/configurations?api-version=3.0-preview.2
Get a specific test configuration:
GET https://{instance}/DefaultCollection/{project}/_apis/test/configurations/{configurationId}?api-version={version}
Refer to Test configurations for details.