Integrating automated tests into continuous deployment


#1

Hello,

I am looking for any suggestions/case studies on the below.

I have setup automated test scripts to run on circleci. I use a standard docker image. I need to access company internal dev urls as part of the testing. But I am not able to access the internal dev urls in the containers.


#2

Hello,
While possible to contact external outside sources from within our containers, it is considered best practice to mock all APIs locallally to ensure the best results.

If you’d like to share more information about the error you have received we may be able to determine what exact issue you are running into.


#3

Thanks for sharing the post. Before going through the blog post, thought of replying to this

If you’d like to share more information about the error you have received we may be able to determine what exact issue you are running into.

There are no specific errors, Dev instance of AUT (browser based portal) is not accessible from the circleci containers. I am not sure if mocking will be an option here.


#4

I think this has come up previously on this board, and Kyle is right - reaching into your company LAN is brittle and may have a security impact. At a stretch, you could use a VPN from CircleCI - however there are various hiccups when doing so (I think you have to use the Machine executor because Docker does not give you enough low-level control to set up a VPN). Only do this if you really know what you are doing.

If you think mocking is not an option, feel free to explain why, if you want feedback on that. (I don’t know what AUT is).


#5

@halfer thank you for your response. AUT is Application Under Test.

Reason why I think mocking is not an option is, its the actual application that I am trying to test is not accessible from circleci containers. So mocking it and using it for testing may not be same as testing the acutal application. Please correct me if you think otherwise.

I am trying to get my head around the VPN option. Are there any posts that you can direct me to ?


#6

In general, it is better to test an application in situ rather than remotely, for the reasons I outlined earlier - it is slow and prone to network failure. Can you load an instance of the program into CircleCI? Feel free to be detailed in your reply.


#7

apologies for a delayed response.

  • I wanted to clarify that the tests i have mentioned in the above are integration tests involving multiple components.
  • if i understand your comment correctly,
    - Build all the applications locally in the circleci container used for integration tests (where possible)
    - 3rd party components need to be mocked where possible
  • Alternative approach will be to use VPN.

Are there any case studies/blog posts about setting up multi component integration tests in various environments integrated into ci/cd process ?