Is it possible to have a kiwi-tcms test case launch an executable on a remote server in order to execute the test case and if so how could that be done ?
Short answer - NO!
Long answer:
what you are looking for is some kind of test runner or CI system - that will connect to a remote computer (or use an API directly) and launch automated test cases based on some parameters.
This brings up so many questions I can't even list all of them here but some of the most important ones:
who/where we store authentication credentials
how are progress and results monitored and reported
when are tests scheduled ? What kind of triggers are supported/desired ?
Kiwi TCMS takes a different approach when dealing with automated tests. You can schedule your tests in any way you like and then report the execution results back to Kiwi TCMS.
We are working on plugins for popular test runners, like JUnit, Python Nose, etc, that will automatically discover the result and name of your automated test cases and report them back to Kiwi TCMS.
If you do need a specific plugin/framework please open a request on GitHub and our team will take it into consideration.
Edit: upvote, comment & follow this feature request at https://github.com/kiwitcms/Kiwi/issues/914
I needed to do something similar: run automation on remote systems and report results back to Kiwi. I put together several components to get the entire system working. Here's what worked for me:
Jenkins to initiate test runs and manage remote machines
A Python script to create test runs against a test plan and write out a custom test run manifest, which is...
Passed to the automation system (.NET/C#) via more scripts to make sure the remote machine is configured correctly
Automation output is directly consumed by Jenkins to report test results for the build/job as well as consumed by another Python script that pushes results back to Kiwi
The automation system knows how to interpret the test run manifest and map test cases to test methods implementing the test. It's important to include the Kiwi caserunid throughout the pipeline so the result is associated with the correct Kiwi entry.
please open feature requests on GitHub if you'd like to get test runner adapters (essentially plugins) for Kiwi TCMS. GitHub is the only place where we can track who needs what and prioritize!
Related
I already have a SQL Server DB and Source control "Redgate" beside that I already connected my project to repo Github and this project also connected to Jenkins.
What I need is to do some kind of unit test on a the tables, like I already got the query and the test will pass values to this query , in away or another it is Unit test.
But I need it to done by Jenkins. Is there any possible way to do it !? in case of YES has that something to with POWERSHELL ?
I'm kind of confused because I know what I need to do, and I have the tools but the structure is not clear for me .
Where and how to do the Unit test and how to push it to everyone that they develop on the DB.
To do unit testing in databases, I'd recommend the tSQLt framework. Have a look at the quick start guide to see how to use it.
If you've already got a license for Redgate's SQL Source Control then you might also have a license for some of their other products - they have one called SQL Test which makes it much easier to use tSQLt within SQL Server Management Studio.
As for running the unit tests within Jenkins, check to see if you also have a license for Redgate's DLM Automation product - it's a set of Powershell cmdlets that you can use for automating database continuous integration and delivery, including running any tSQLt unit tests that are present. Luckily there is a Jenkins plugin available for it - https://plugins.jenkins.io/redgate-sql-ci
There are also some good videos here on how to use it - http://www.red-gate.com/products/dlm/dlm-automation/resources/
You've got a handful of questions over there, let me try and address most of them.
I'd use Pester Powershell module to create a test (that's using Invoke-SqlCmd) that would output result to xml, so the jenkins can parse them.
You can do db tests in any language you like, actually, like Jenkins can run whatever you feed into it, c# tests, python tests, powershell tests and so on, its just a matter of personal preference which language\stack are you going to use.
I'm not really sure what you mean by: "how to push it to everyone that they develop on the DB".
This is what I had to run the tests with powershell and have jenkins consume them:
$tests = Invoke-Pester -OutputFormat NUnitXml -OutputFile tests.xml -PassThru
if ($tests.FailedCount -eq 0) { Remove-AzureRmResourceGroup -ResourceGroupName $rgName -Force }
I have written quite a few Ruby programs for my clients test automation project.But the problem is my client wants to check the output to his PC without instilling ruby.He is asking me to make one web application where he can select functionality from drop down and run the automation by clicking run button.And after completion the test it will auto generate a test result.Is there any possible way to do so?
He is asking me to make one web application where he can select functionality from drop down and run the automation by clicking run button
A work around to let your client run the current tests without installing the environment on their PC is to use the CI tool Jenkins, and a few of the Jenkins plugins such as CI Reporter which is an add-on to Test::Unit and RSpec that allows you to generate XML reports of your test and/or spec runs.
You can set Jenkins up on a server that they can hit virtually from anywhere and trigger a shell / selenium script that can execute all the unit tests and functional tests against the latest build / code, and all your client has to do is hit a "Play" button to execute them.
And after completion the test it will auto generate a test result.Is there any possible way to do so?
Here are some example images that some of the data Jenkins can export. It's really easy to set up and the community is massive in regards to support.
Screenshots of Failed Tests Results and Passed Tests Results
Hope this helps!
I'm trying to implement automated integration tests for my application. It's a very complex monster. You could say that its database and part of the filesystem are part of its state, because it saves image files in the hard drive, and references to those in the DB. The software needs all those, in a coherent state, to work properly.
Back to writing tests: To run any relevant test, I need some image files in the filesystem, and certain records filled in the database. I thought of putting all of these in a separate folder called TestEnvironmentData in the repository, and retrieving them from the Continuous Integration Server (Team City), but a colleague said the repo is quite full as it is, and that I should set up a special directory, and databases, only in the Continuous Integration server. I don't like that because the tests success depend on me manually mantaining stuff in the server, and restoring initial state before every test becomes cumbersome.
What do you guys do when you need to write integration tests for an app like this? The main goal is having an automated test harness to approach a large scale refactoring. There's lots of spaghetti code and the app's current architecture is hardly unit testable, that's why I decided on integration tests first.
Any alternative approach is welcome.
Developer Repeatability is key when setting up a Continous Integrations Server. I have set one up for my last three employers and I have found the key to success is the developers being able to run the same tests from their dev system in order to get the same results as the CI Server.
The easiest way to do this would be to check in the test artifacts into source control but you could also use dropbox or a Network Share that you copy them from in one of the build steps.
For a .Net solution I have always used MsBuild as you can most easily replicate the build process of Visual Studio and get the same binaries/deployables. As for keeping your database in sync so that tests can be repeatable in the past I used the MbUnit test framework and the [Rollback] attribute as it would roll back any changes to Sql Server that happened in the test. I believe that Nunit now has this attribute as well.
The CI server is great for finding code that breaks existing functionality but unless developers can reproduce the error on their machine they won't trust the CI server for some time.
First of all, we use Maven to build our code. It's like ant, but it relies on convention instead of configuration for many things, like Ruby On Rails does. One of those conventions is a standardized directory structure:
(project)----src----main----(language)
| | \--resources
| \--test----(language)
| \--resources
\--target---...
Using a directory structure like this makes it easy to keep your application resources and testing resources near each other, yet still be able to build for test or build for production, or just build both but just package up the application parts after running the tests.
As far as resetting the database between tests, how you do that is greatly dependent on the DBMS you're using. For instance, if you're using MySQL it's very easy to get the test data the way you want and do a mysqldump to a file you then load before the test. With other DBMSs you may have to drop and recreate the tables and reload the data, or make separate tables for the starting point and use a CREATE/SELECT sql statement to duplicate it each time.
There really is no reliable way around the "reset the database between tests" step.
What I want is to run my WPF automation tests (integration tests) in the continuous integration process when possible. It means, everytime something is pushed to the source control I want to trigger an event that starts the WPF automation tests. However integration tests are slower than unit tests that is why I would like to execute them in Parallel, in several Virtual Machines. Is there any framework or tools that allows me to run my WPF automation tests in parallel?
We use Jenkins. Our system tests are built on top of a proprietary framework written in C#.
Jenkins allows jobs to be triggered by SCM changes (SVN, Git, and Mercurial are all supported via plugins). It also allows jobs to be run on remote slaves (in parallel, if needed). You do need to configure your jobs and slaves by hand. Configuring jobs can be done with build parameters: say, you have only one job that accepts test id's as parameters, but it can run on several slaves; you can configure one trigger job that will start several test jobs on different slaves passing to them test id's as parameters.
Configuring slaves is made much easier when your slaves are virtual machines. You configure one VM and then copy it (make sure that node-specific information, such as Node Name is not hard-coded and is easily configurable).
The main advantages of Jenkins:
It's free
It has an extendable architecture allowing people to extend it via plugins. As a matter of fact, at this stage (unlike, say, a year and a half ago) everything I need to do can be done either via plugins or Jenkins HTTP API.
It's can be rapidly deployed. Jenkins runs in its own servlet container. You can deploy and start playing with it in less than an hour.
Active community. Check, for example, [jenkins], [hudson], and [jenkins-plugins] tags on SO.
I propose that you give it a try: play with it for a couple of days, chance are you'll like it.
Update: Here's an old answer I've liked recommending Jenkins.
We are developing some testing infrastructure and I have hit a coders block (lack of sleep?)...this seems like it would be a solved problem but I haven't found what I'm looking for via google.
I would like to automatically push builds from our CI server (TeamCity) to a number of machines (growing, but currently 30). These are several WinForms apps and a number of dlls. Once deployed, I would like to kick off tests (NUnit, for both unit and integration tests) and report all results (back to CI? or somewhere else? Not sure).
The target machines are a number of platforms (Win7,Vista, XP, Server 2k8, Server 2k3, Ubuntu, Fedora, Suse, x64, x86, maybe macs down the line)
This gets me part way there (the actual push). But I can't find existing solutions for 'push starting' the tests and reporting back. So far I am thinking of combining the link (or similar) with custom code running on each client machine that watches the deploy directory, runs the tests and reports the results.
Does anyone know of existing solutions?
Links?
Done something similar and care to share?
Edit
If possible, we prefer .net based solutions, but it isn't strictly necessary. I would have tagged the question as such, but ran out of tags :)
You could use KwateeSDCM to both push and start on all the platforms you mention, including mac. However, you'll have to do some coding to get reports out. I'm not familiar with TeamCity but maybe you could push a script along with your application which could then transfer the test results via ftp to a server accessible by TeamCity.
Have a look at: STAF (Software test Automation Framework)
The Software Testing Automation Framework (STAF) is an open source, multi-platform, multi-language framework designed around the idea of reusable components, called services (such as process invocation, resource management, logging, and monitoring).
Which includes STAX:
STAX is an execution engine which can help you thoroughly automate the distribution, execution, and results analysis of your testcases.
And there's an article here:
http://agiletesting.blogspot.com/2004/12/stafstax-tutorial.html
Assuming you have the push part done already, and you don't mind using a TeamCity license, you can create a TeamCity Command Line Runner build configuration or NUnit test configuration that kicks off the tests on a properly configured agent. The build trigger for this test config would be successful completion of the application build.
So far I have ended up using a seperate build step in TeamCity that executes a bat script that in turn fires of tasks to the list of machines using PsExec. So far my trial runs it is working ok, though I now need to parallelize the copying of build output...
Thanks for the input to those who have provided it.