Is there a way to test codes that are written against AWS API?

0 votes

Can we write code that tests to that the file gets uploaded to S3. The test will be written before the code for TDD. This is to be done using JUnit?

Apr 17, 2018 in Cloud Computing by hemant
• 5,750 points
16 views

1 answer to this question.

0 votes

Please note that you should not integrate AmazonS3 interface in your business classes, instead wrap it in a thin interface, so that if you decide to change the 'back-end storage' you can easily change it.

Now note that the actual uploading and the tests that are done are part of integration testing and not unit testing.

Here if you wrap the S3 API in a very thin class, you will mock that class for unit testing of your business classes, and you will use the real implementation for integration testing.
 

So, if you have decided, your business classes to take directly the AmazonS3 interface, then for unit testing you have to mock that one.

The actual exploratory testing (learning and verifying) if and how amazon s3 works is what you actually do in separate experimental setup.

answered Apr 17, 2018 by brat_1
• 7,080 points

Related Questions In Cloud Computing

+2 votes
2 answers

Is there a way to add cache control in AWS S3?

use of  current upstream master branch will ...READ MORE

answered Apr 10, 2018 in Cloud Computing by hemant
• 5,750 points
722 views
0 votes
2 answers

Is there a way to copy AMI from one AWS account to another AWS account using boto?

You could share the AMI from one ...READ MORE

answered Aug 21, 2018 in Cloud Computing by Priyaj
• 56,200 points
267 views
0 votes
1 answer

AWS: Is there a way to simulate perimeter security using Amazon Web Services Model?

As we all know traditional perimeter security ...READ MORE

answered Jul 11, 2018 in Cloud Computing by DragonLord999
• 8,380 points
174 views
+2 votes
2 answers

Is there a way to get IAM Credentials from Cognito Username/Password from CLI?

Try doing it the other way round. ...READ MORE

answered Mar 27, 2018 in Cloud Computing by brat_1
• 7,080 points
49 views
+3 votes
3 answers

Is it possible to delete a API in AWS API Gateway?

Yes, it is possible to delete an ...READ MORE

answered Mar 27, 2018 in Cloud Computing by brat_1
• 7,080 points
575 views
0 votes
1 answer

Is there a way to find out the number of objects stored in an S3 bucket?

Frankly, that is not possible. This is ...READ MORE

answered Apr 17, 2018 in Cloud Computing by code_ninja
• 6,220 points
28 views
0 votes
1 answer

Is there a way to import custom SVG shapes(clipart) directly into Dia?

If you are fine with compromising advanced ...READ MORE

answered Apr 18, 2018 in Cloud Computing by code_ninja
• 6,220 points
45 views
0 votes
1 answer

Is there a way to use amazon ECR image from one account in the code build of another account?

These forums might just about help https://forums.aws.amazon.com/t ...READ MORE

answered May 7, 2018 in Cloud Computing by brat_1
• 7,080 points
131 views
+3 votes
3 answers

Is there a way to install apache drill on an EMR cluster on AWS that is already Running?

It looks to be trying to get ...READ MORE

answered Oct 11, 2018 in Cloud Computing by findingbugs
• 4,750 points
266 views
0 votes
1 answer

Is there a way to transfer files between AWS s3 and ec2

The answer is a definite yes yes. ...READ MORE

answered Apr 17, 2018 in Cloud Computing by brat_1
• 7,080 points
43 views