0

I have some AWS features related test in a maven project which I would like to run with command prompt. Below is the workflow to run these test:

  1. I hit a powershell file to generate aws credential
  2. I add them in edit configuration (When run through intelij)
  3. I run

Same steps when I replicated with a batch file, I created batch file with following content:

powershell "D:/Users/dosqauser/awscred.ps1"
cd "D:/Users/UserName/Documents/API_Automation/api-automation/"
mvn -DargLine="AWS_PROFILE=env-fullaccess" test

This is not setting the credential as I am getting following error:

aws.doesBucketExist(bucketName), Unable to load AWS credentials from any provider in the chain.

I tried with this as well after reading some answers :

export AWS_PROFILE=env-fullaccess
mvn test
unset AWS_PROFILE

but it also didn't work.

Jaime S
  • 1,488
  • 1
  • 16
  • 31
QualityMatters
  • 895
  • 11
  • 31
  • This maybe https://stackoverflow.com/a/34716689/9095551 – Beppe C Jan 15 '20 at 10:48
  • I am trying to use a key-value pair that generates in the first step of the batch file. powershell "D:/Users/dosqauser/awscred.ps1" while in the mentioned answer, he/she is using a class file – QualityMatters Jan 15 '20 at 11:48

0 Answers0