Postman is a great tool for interactive testing. But for completely automated testing it is better if you use a framework (e.g. Rest assured)
https://semaphoreci.com/community/tutorials/testing-rest-endpoints-using-rest-assured
We autobuild a docker container that is pulled from our repo with all dependencies baked in. Here is the original article I started with last year.
https://semaphoreci.com/community/tutorials/dockerizing-a-python-django-web-application
I’ve had less down time but slower speeds. Was hitting peak 160 to 230 a few days ago now getting 80 down max.
To keep some kind of context on this read up on a software deployment strategy often used by companies called canary deployments. https://semaphoreci.com/blog/what-is-canary-deployment
Just for the folks who haven’t seen behind the current in a software company shop how changes are propagated out to the users.
Think back to junior high when you learned about scientific method that’s what their doing. And were the lucky rats on the cage.
I came across this article that covers the following:
It includes info about handling the binary, configuration files and static view files. Hope it helps you.
Basically, yes.
A mock replaces a function with a different version with some defined behaviour. For example, I might override a function that returns some data from a database to instead return some stock test data so that I can test my code without having to use a testing database. Or I can use a mock for input
that lets me test different possible user inputs to see that I correctly handle all cases.
In this case responses
lets you define a response for a particular requests
request call using a simple and compact syntax. You can compare this to the requests mock example halfway down this page..
stumbled across your project as I'm trying to learn go and start a similar api project. I like the structure, just wish there were example tests; as others have pointed out, I'm not sure how testable it is.
I found this resource to provide a decent testable starter, but it lacks structure (everything in main), orm (& mocks), and jwt... so I'm trying to marry with yours...
https://semaphoreci.com/community/tutorials/building-and-testing-a-rest-api-in-go-with-gorilla-mux-and-postgresql
Some have claimed it feels faster, some have benchmarked it as about the same. You should switch because what you're using hasn't had support or updates for over a year, and as browsers advance and language implementations evolve your tools aren't changing the same way. Here's the project maintainer telling you why you should switch:
> Chrome is faster and more stable than PhantomJS. And it doesn't eat memory like crazy.
> I don't see any future in developing PhantomJS. Developing PhantomJS 2 and 2.5 as a single developer is a bloody hell.
But you do you; I'm not telling you how to run your projects!
You can check out these tutorials for a general overview of the whole process: - https://semaphoreci.com/community/tutorials/dockerizing-a-php-application - https://semaphoreci.com/community/tutorials/dockerizing-a-ruby-on-rails-application - https://semaphoreci.com/community/tutorials/how-to-deploy-a-go-web-application-with-docker
> Almost every new project is being written in 3
That doesn't seem to be true.
This shows more than 2/3rds of new projects (on a certain paid CI server) are using 2.7 rather than 3.x: https://semaphoreci.com/blog/2016/11/11/python-versions-used-in-commercial-projects-2016-edition.html
A more correct statement is that most new projects are being written in python 2.7, but that 3.x is gaining, and is expected to overtake 2.7 in 2017.
This one which i think has been getting some good traction in the sub looks to be a good mix of what you are looking to do, it includes testing, interaction with mongo and simple templating.
AWS Code Pipeline may be cool, but not sure what all it supports: https://aws.amazon.com/codepipeline/
Semaphore says standard git repo support "coming soon": https://semaphoreci.com/
Seems like everyone else, especially hosted platforms, specifically only tie into Github, or sometimes also Bitbucket and even saw one that supports Google Code oddly enough.
I'm working in a company that's developing https://semaphoreci.com - a continuous testing and deployment platform and we're hiring developers willing to work with Elixir and/or Ruby - http://renderedtext.com/jobs/2015/lead-engineer/. Let me know if you have any questions about that. Cheers.
"Testing in Ruby" is quite a broad topic. What is your experience like with testing in general? In my opinion Ruby is the most test-forward language out there and has tons of cutting edge libraries and interesting ideas (e.g. Cucumber)
If you want the skinny, start with Minitest. I just Googled it and this seemed like a good primer: https://semaphoreci.com/community/tutorials/getting-started-with-minitest
In your case, Azure App Service is exactly what you need. You can get started with that as an almost exact fit with cpanel. You can publish via ftp and it all just works. You don't get the endless customization with cpanel, but it's pretty straightforward to run php applications.
You can get free usage (don't remember exactly how much) for a while.
Once you get the hang of that, you can start learning about docker and kubernetes. This is one of many guides to dockerize a php application. Once you get that far you can read the official docs. Here is the quickstart for Azure Kubernetes
Here's another one using Gorilla Mux:
Building and Testing a REST API in Go with Gorilla Mux and PostgreSQL
We recently migrated a rather large project (Laravel + some microservices) to Docker + docker-compose. The following containers were defined: - web server (nginx) - api (PHP-FPM serving the Laravel app) - worker (this is mostly the same as api, but it includes supervisor and runs schedule:run every minute) - socket.io container - 3 microservice containers
For running the build and deploying we use Semaphore (previously we used Laraver Forge + Envoyer) When we push to master/staging a build process starts on Semaphore that builds and pushes to Docker Hub all containers defined in our production docker-compose.yml. During the build process we copy all relevant source files to their respective containers as we don’t use volume binding in production. After the build passes we have two promotions that we can trigger: deploy to AWS Elastic Beanstalk (staging) or deploy to our dedicated servers via SSH and docker-compose pull (production).
AWS EB handles no downtime deployments automagically, however for our custom production servers we put traefik in front of the web server container.
I think that’s all, if you have questions just let me know.
I don't know if this qualifies as an explosion, but at least for me it is 😀
The first book ever I co-authored was released today, so I'm really happy 🚀.
Check it out, it's completely free:
I tried something similar to this but decided React wasn't for me and moved on to try Flutter but reused the same GoLang backend. Can't remember the exact tutorials and resources I used but essentially I ended up using Gorilla Mux for routing with a sql DB on the back (not ideal but it's what I was familiar with) and built up a set of CRUD-like routes that I could call from my client. These would all pass in JSON or get JSON back.
I think this is the resource I used for GoLang api: https://semaphoreci.com/community/tutorials/building-and-testing-a-rest-api-in-go-with-gorilla-mux-and-postgresql
As for the react side of things I ended up just using standard HTTP requests and passing JSON about but I remember seeing suggestions to use a dedicated library like Axios for bigger projects.
If you need any other resources search for something like GoLang CRUD API or GoLang CRUD Rest-ful service.
If you know SQL, then an ORM like the one used by Rails' should be fine. Just make sure you log / study the ORM -> SQL equivalent. User.find(1)
-> SELECT * from USER (where ID = 1) LIMIT 1;
Understanding what happens underneath the hood is critical to understanding how databases are managed at a high level. Otherwise, things like the "n + 1" problem will crop up a lot.
For the uninitiated, n+1 is a common issue in database query management where a user naively produces an iterative solution for grabbing data when that should have been a single call. https://semaphoreci.com/blog/2017/08/09/faster-rails-eliminating-n-plus-one-queries.html. Active Record is capable of being a fast, efficient, machine, but many new users don't read about these things and they ignore it. Rails obfuscates the complexity which is great! But it means you can build solutions that run slow without even realizing it, which is bad. When you start to see your logs scroll by with tons of SQL calls (Rails logs them in development), then you might want to make sure you're not missing something like this.
[This](https://semaphoreci.com/community/tutorials/getting-started-with-rspec) should answer your issues with getting RSpec up and running.
​
I wouldn't hire a junior if they didn't know how to write basic tests -- it is as important as the operational code.
Most projects I've worked on have set run unit tests to run every build, and only run integration tests nightly.
The above blog post describes most of the concepts you need for this.
​
>!Disclaimer: I Work at Semaphore.!<
Have you checked Semaphore CI? Perhaps our approach and flexible pipelines might be a good fit for your "big team" scenario.
> [documenting functions] I'm not sure what the "proper" way to document these would be
Read some style guides. It's not the end of the world if you don't know anyone's standard, but I like to get a sense from candidates how they view documentation within code. If they don't detail what functions expect to accept and return, the other aspects of the interview had better be stellar.
> Do you have any resources for what data structure is good for any given scenario?
Not really. It's good to know which types remain immutable, and the speeds for generation, lookup and iteration for each type. I have pressed candidates to refactor code from a list of dicts to a simple dictionary and what that would mean for code optimization, if anything. Some design questions come into play for when to use environment variables, in place of configuration files, in place of a database service. How to handle read/write issues and security come to mind.
> when I need to know the index...
Yeah, this is a common "problem" with Python coders. Again, style guides typically call out certain behaviors common in other languages for which Python has its own methodology.
for index, element in enumerate(sequence): print('{:<30}{:>5}'.format(element, index))
Unit tests help other coders understand how changes they make affect other functions. Unit tests highlight how functions handle erroneous input or other bad data. I like this introduction and this easy to follow video. For the video, I like the Socratica Python series for beginners.
Happy coding!
Lrn2SSHbrah.
Seriously. You will need to know how to do this if you're working with servers. It is how we work with linux servers remotely.
How are you connecting the server to the network? How are you connecting your clients to the network? Your network is the bottleneck. The server, at least, should have a wired connection to your access point. The clients and access point should all be wireless-N capable if you're using wireless, and will improve in speed if you also connect them through a wire. Be aware that the speed of home networking equipment is orders of magnitude slower (and less expensive) than the speed of datacenter and enterprise capable networking equipment. On my wired subnet I can transfer files up to 11 megabytes per second between machines, and that's slow compared to the speeds you can achieve with more professional equipment.
Using Page Objects with Protractor and Cucumber in Angular Applications
I often use the gin framework to develop my web application for it's easy and high performance. Here is a good tutorial.
https://semaphoreci.com/community/tutorials/building-go-web-applications-and-microservices-using-gin
I'd look in to Sinatra - much more light weight if you're looking to either build a simple web API or just serving up one or two pages.
As for deployments, your devops team can still use tools like Capistrano to deploy it. Here's one of many tutorials
I wrote a tutorial about deploying a Compojure application to OpenShift that you might find useful.
Generally, I have toy project deployed there and didn't have any problems so far.