AWS Lambda selenum UI testing - amazon-web-services

So I have written a bunch of selenium UI tests for a web app that is hosted privately on GitHub and I want to run these tests from AWS Lambdas. My question is how do I get the testing file to be able to interact with the rest of the GitHub repo, as there are models and libraries that the Selenium testing relies on the main GitHub repo.
I was thinking of just zipping the repo and uploading it to Lambdas and then running the testing on it but that doesn't strike me as the best way to do it.
Any help is appreciated,
Thanks

Related

How to Selenium test Django project that retrieves data through APIs?

I have a Django Project. I want to make end-to-end tests for it using Selenium.
It interacts with Other components (usually run through docker-compose) API and functions properly.
The Django Project and 'Other Components' are different repositories (obviously there are multiple 'other components')
Testing of parts that don't involve API calls, have been tested.
You can use a continuous integration like Jenkins to do your automated task like Selenium.
It's really easy to install localy and/or to serve.
How to install Jenkins : here
have a great day!

Testing gmail addon

I've created a gmail addon which uses oauth to make external api calls using UrlFetchApp and then uses cards with CardService to show some info.
It all works but there's no documentation on the gmail addon page about how to test the addon. My goal is to write some unit and integration test for my addon core working and have it run on ci services such as Travis. There are many classes the addon uses which are only available in the app script environment such as CardService, OAuth2, GmailApp so mocking all of their functions is quite a bit of work.
Has anybody developed gmail addon with tests which can run on ci services?
GMail add-ons are relatively new to the GSuite ecosystem so you're unlikely to find mocks for it. However, there have been attempts to build Test frameworks for Apps Script.
There is an "awesome list" of GAS resources maintained by Alexander Ivanov on Github with a section dedicated to testing. See link below:
https://github.com/oshliaer/google-apps-script-awesome-list#testing
In its current state it may be difficult to set up Apps Script for continuous integration but with the planned language upgrade to Chrome's V8 engine that may soon change.

using s3 for a website which includes ajax calls and node modules folder

I need your help regarding on serving my webapp on a server:
I have a nodejs app and I have it running in ExpressJs in beanstalk and it is working fine,
However I am thinking to use s3 instead. So in my website I have all sort of ajax calls and also I have couple of modules in nodejs folder which is generated via npm install.
Here is the link I used in aws:
http://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
But it is not very clear about it.
I am thinking if it is doable to use s3 for this website?
Also can you please provides some pros and cons? I appreciate it because this will help me a lot on making decision whichone to choose?

Postman & Github Integration

I am using GitHub repositories to back up my Postman collections in the form of JSON format.But, I am unable to integrate GitHub & Jenkins directly. Please confirm, Is there any way by which latest code which I have committed in GitHub in the form of JSON , can automatically get executed through Jenkins ?
Yes you can.
All you need to do is configure Jenkins to listen to changes on your Github repository.
The you can follow this guide or read up any of the numerous ways in which teams are using Postman with Jenkins.

How do you sync Postman with a git repository

I'm wondering how you can sync your Postman config with a git repository.
I know you can export and import from Postman to a folder - which is OK - but I wondered if there was something more effortless.
I'm not exactly sure how you're trying to use this, but a few options would be:
First Option
to use their addon cli called newman. You can run collections from a URL or Local file with newman using
newman run http://some.url.here
Then if you make the remote url a part of a git repository it would obviously update/change with each commit/pull
Second Option
Try this with extreme caution and only if you feel comfortable with the process, also this may not be compliant with their terms of use so I don't suggest you try it without first some research
If you can find the directory in which the Postman collections are held, you could create a hard link with the command line from a git repository on your machine to the directory or specific file you need to link. Whenever you change the source file the one in the Postman config will change.
The way in which you accomplish this will depend on the system you use and version of Postman.
In addition to exporting and cloud syncing as mentioned in the other answers, there's some other options too.
Postman added a Git sync in Postman app v9 so you can manage version control with forking, merging, and pull requests.
There are also built-in integrations to sync your Postman collections with GitHub, with GitLab, and other services for version control. These integrations are for users on the paid plans.
Postman also has an API so you can GET and run the latest version of your collection, environment, or whatever using Newman or continuous integration tools or to build your own integration.
Postman is not designed for that case. They offer a cloud service which keeps you and your collaborators in sync. You can try their cloud plan for 30 days for free. Check here: https://www.getpostman.com/cloud_trial_faq
You can use Postman integrations (Home > Integrations) to link Postman to your remote git repository.
The following article explains how to integrate your gitlab repo to Postman:
https://learning.postman.com/docs/integrations/available-integrations/gitlab/
Also you can use Postman API versionning to do something similar:
https://learning.postman.com/docs/designing-and-developing-your-api/versioning-an-api/
For non-free plans, Postman now (version 9 and up) supports automatic sync of collections with a git repository on several popular git services.
(Again, it's currently only available for paid plans)
See the documentation for how to integrate Postman with GitHub, GitLab and Bitbucket.
The process is roughly:
create a dedicated repo on your git provider (e.g. my-postman-collections-repo)
create a personal access token for the provider (e.g. GitHub) with the expected scope (e.g. repo and user)
define an integration (using postman UI) for each collection you want to be kept in sync
I'm working with the GitHub integration and it works great.