Continuous integration with Yii - testing

I have implemented the unit testing with Yii and phpUnit. I want to do more, please help me with this.I am developing ma software in multiple local machines. I wanna keep a repository and want to automate the merging of local developments and test it..kind of continuous integration.
Any one have such suggestion?

If you do not have much experiece working with revision control applications, I'm offering you to use SVN as your revision control software.
For Continues integration, there are jenkins, and phpci on top. for example you can configure your ci server to build & run all the test unit after each commit (via jenkins hook system) and in case of any failed test, send an email to commiter and so on.

Related

Reporting test result in order to create nightly metrics

I have a micro services system written in java and deployed using docker containers.
In order to run our nightly tests, a tester container is started, performs it's e2e tests upon the system and creates it's junit report.
I wish to generate a summarized report at the end of the tester's run, simply a list of failed tests, and send it to another server for long time storing and analyzing.
I suppose I could alter said Tester's Dockerfile, and add this functionality as a command which process the junit report and send it, but I wonder what should be the best practice, both for generating the report and sending it.
Thanks in advance,
Ariel

Jenkins testing setup and test in every push for main project or testing code push

I have to test the project code using Jenkins. In Jenkins, I am using automation testing throw selenium. then my question is I have test scripts on my laptop and using Google Cloud virtual machine SHH i have to set up and test in every push on git. Here is my 2 demand-
1. on demand-whenever we want all the test run we should just trigger the test run.
2. Whenever we deploy something on staging then test all the test cases
Regarding (1), you are always able to trigger a job manually through the Jenkins UI. No special configurations there.
Regarding (2), you can install a plugin that will integrate webhooks functionality into Jenkins. In my case, I like to use Generic Webhook Trigger for this purpose, as it has the flexibility that I need on my setups.
In order to trigger the job on every deploy to staging, and assuming that your deploys are automated, you will need to add a final step on the deploy script, to make an HTTP request to the webhook URL (eg. JENKINS_URL/generic-webhook-trigger/invoke?token=<your-token>
I don't fully understand your setup with your machine and the VM on GCloud, in any case, I believe that the test code should be available to the machine running the tests, and not be stored in a location that might be unavailable when the tests need to be run (as your laptop might be).

How to run a build server task under a specific user account?

I require my VSTS build server, or more accurately my build agent, to execute a task under a specific user account. Example:
One of my build steps tests the UI of an application. It requires to be logged in under a different account to be able to execute tests correctly. I cannot find anything in VSTS that allows me to configure that.
My current workaround is to run my tests in a different thread, started via a PowerShell command; however, this solution feels dirty, is fairly complicated, has limited live reporting and costs work to re-integrate the test results.
Is there any better way, maybe one that work straight out of the box via VSTS?
Note: Changing the build agent to run under a different account doesn't work because I need to run tests under multiple accounts long-term to test various authentication features.
You can run the test on remote machine by using Visual Studio Test Agent Deployment and Run Functional Tests tasks.
With this way, you can specify username and password that the test agent running on (Visual Studio Test Agent Deployment task).

How can I decide automation feasibility for web application?

Guys I need to decide feasibility of automation testing in web application. Application is developed in c#.net. Can any one guide me about factor which I need to consider for automation testing. I have some basic knowledge of Selenium WebDriver using Java, can I test web application using it? This application is leasing application it contains many calculations to calculate plan. Application also contains many reports as well as graphs to analyse enquiries as well as results.
I suggest some basic links to start with
http://www.softwaretestinghelp.com/choosing-automation-tool-for-your-organization/
http://searchsoftwarequality.techtarget.com/answer/How-to-choose-the-best-software-test-automation-tool-for-your-team
http://www.xoriant.com/blog/software-testing-and-qa/selecting-right-test-automation-tool.html
Your approach is definitely good. You can develop a ASP.NET MVC web application in C#, setup some core business logic by classic unit test and make integration test using selenium driver.
I suggest following that you first create a lightweight skeleton of the project containing:
git repository
ASP.NET web application
continual integration with build machine (use TeamCity or similar software)
unit test testing your core business logic
integration test written in selenium driver using C# running for all common browsers with good selenium support.
Check that with every commit following happen:
build is triggered
deployment package is created
unit test are triggers
integration test using selenium driver are triggers
all reports are collected
test results are stable (same results for same build number for repeated testrun)

Test harness for lab setup

We are new to test automation, and finally we finally automated our setup (black box testing). A brief overview of our setup:
Each setup consists of 2 linux PCs and 1 windows PC - the PCs communicate to one another via an embedded board.
Before we used to manually run test cases from the linux machine - this would require both typing in the Linux machine and also some operations in the windows PC. Now instead we have written a C wrapper from which you can trigger any number of test cases and thanks to AutoIT the windows PC operations are now automated as well.
Now we have multiple such setups - I want to have a central test controller that,
Given a set of test cases (and the corresponding executable to be run on the embedded board) can distribute and trigger it in parallel across setups
During overnight tests it can keep track of which test cases have been executed and which ones are pending
Quarantine test cases
Continuous integration - we use CVS
etc etc
Basically a powerful test harness software running on a PC - this PC is connected to all the setups using a router.
Any suggestions from open source (free) projects for such a software, more than having all the features mentioned above, i want something that does most of it, I can code and add additional functionalities as need
I tried browsing online and seem to find some but they all seem to be for testing websites, not sure if it would suit my use case. Would really appreciate inputs in this regard.
Thanks
ok i am going to ignore most of the stuff that you described which looks like you have automated already, and correct me if i am wrong but i think you are looking for is controller for all these automated jobs.
I would say that Jenkins CI is the ideal solution for you.
In jenkins everything is controlled by a master machine, this machine then in turn controls slaves (being your other pcs or linux machines) via java. so this gives you overview of the system.
you can then create jobs and ristrict where they can run, these jos can pretty much do anything. Including taking parameters for what to run, you can also create matrix configuration jobs which allow for one setup to be run simlutansily on however many slaves you need.
You can set this process or timer, or trigger , build externaly or internaly or etc etc ...
Also I am pretty sure Jenkins has some dedicated plugins for working with CVS some of which are built into the OOTB setup.
Jenkins is the way to go here .