Kiwi TCMS and Jenkins Integration - kiwi-tcms

Are there any integration points between Kiwi TCMS and Jenkins?
Is there way to to update the test case status in Kiwi from jenkins job execution?

Related

How to run tests using selenium grid from Jenkins on different remote servers

We have Jenkins server hosted in Linux server, and we want to trigger our selenium tests from Jenkins to different remote desktops (Windows) using selenium grid (Here, Jenkins, hub, and node all three are in different machines).
Note: We aren't allowed to host Selenium hub in the same machine where we have Jenkins or install any Selenium Grid plugin in Jenkins.
You can use remote driver. Here is simple example
options = webdriver.ChromeOptions()
driver = webdriver.Remote(command_executor='http://<your_windows_IP_ADDR>:4444/wd/hub', options=options)
It will be in your code, you will run Selenium Server(Grid) on your Windows device. Then you can configure any setup after that.

Some warning about manage.py migrate after upgrading to 6.4

I upgrade TCMS from 6.3 to 6.4. when executing command "docker exec -it kiwi_web /Kiwi/manage.py migrate", I got following message:
Operations to perform:
Apply all migrations: admin, attachments, auth, contenttypes, core, django_comments, kiwi_auth, linkreference, management, sessions, sites, testcases, testplans, testruns
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Shall I handle this? Not see this before.
This is issue with one of our dependent libraries which is being solved as we speak:
https://github.com/treyhunner/django-simple-history/issues/512
If you are working on a new Kiwi TCMS installation running ./manage.py migrate for the first time is fine, trying to run it a second time will produce the error mentioned in original comment. This doesn't affect your DB at all.
If you are trying to upgrade from a previous version of Kiwi TCMS this will break the upgrades b/c migrate will refuse to execute. You can manually apply this change to your Docker image:
https://github.com/kiwitcms/Kiwi/pull/710/commits/61368aa254073bf6189bc3821f71d190c1a18501
or wait until we release the next version.

How to make jenkins job as unstable after TestNG Failures

I have configured my test scripts to run from Jenkins using TestNG XML. This xml triggers a suite of testcases from my available test suite. This xml is triggered using a batch file and configured as a build step in Jenkins.
Issue:
Though some of my test case is failing, jenkins job is reporting as Pass since the batch script was completed successfully.
Is there a way to pass the Failure report back to batch file and then to Jenkins to report fail if any test case in the suite failed.
Use TestNG Results Plugin, https://plugins.jenkins.io/testng-plugin.
Then publish the testng result by providing appropriate path to the testng-result.xml. The job will turn yellow on failures.

Error in Selenium tests triggered from batch script in TFS Build step

Step 1. I have written selenium tests and bundled it into executable jar.
Step 2. When I execute this jar tests runs normally. Invokes New browser and execute all steps.
Step 3. I created bat file to execute this jar. In this case also test execution happens normally.
Step 4. TFS Build integration. (TFS 2015)
- I created new build definition in TFS
- Added build step "Batch Script"
- Entered path of bat file created in step 3 in build step
- When I Queue this build. bat file gets called and test execution starts. But It does not open new browser..console says Started IE driver...it starts driver internal to build agent. and execution fails on setting value in textbox.
Click to see TFS Build Cosole
I can't use Visual studio tests. Requirement is to selenium tests should be triggered from jar created on Step 1.
Make sure the build agent is running in interactive mode.
First you could try to RDP to the remote build server(the build agent located) and manually run the batch file to see if it works.
If it's also not work then the issue may related the IE browser on the server.
If it works then maybe the TFS build service account don't have enough permission to run the IE driver. Please make sure the build service account has local Admin permission on the build server.

Google App Engine: How to perform a remote deploy to dev app server?

I am in the process of setting up a "QA environment" for my GAE app. This QA environment will simply be a small server on my home network with a dedicated IP address. I'm writing an Ant script to check the project out of my SVN repo, build it on my build server, and then deploy it "remotely" (across my home LAN) to the QA app server.
With Tomcat, I would just scp the web archive to the machine's webapps/ directory, and since it can be configured to hot-deploy, that is all I usually need for a QA deploy.
But I'm new to GAE, and so I'm not seeing how I can achieve such a remote deployment via Ant. The best I can think of (although somewhat convoluted) would be:
Checkout and build the WAR on the buildserver, like I normally would
scp the WAR to a staging directory, somewhere on the QA machine; say 192.168.1.55:/opt/gae/staging
Have a lightweight RESTful web service running on that machine (maybe hosted by Tomcat or Jetty) listening for a client to hit a certain API, say http://192.168.1.55:8080/GaeRemoteApi/deploy; when the request handler gets a request for this URL, it kicks off a shell command to copy the WAR into the correct directory and then execute appcfg.sh -upload to actually deploy the WAR to my QA app server
I'm pretty sure I could get this working within a day or two, but was wondering if the GAE ships with an easier (baked in) solution; or if a fresh set of eyes can think of something even simpler. Thanks in advance!
I think you should just keep it simple:
Since you are on Ubuntu, you can write a shell script that will:
ssh to the remote server
stop the current gae dev appserver
rename the existing war directory
scp the new deployment to the QA server war directory
ssh to the QA server and start the gae dev appserver
You can call a shell script from ant using: http://sumedha.blogspot.com.au/2008/06/how-to-call-shell-script-from-ant.html
To stop the dev appserver:
killall -e ./appengine-java-sdk/bin/dev_appserver.sh
To run the dev appserver:
nohup ./appengine-java-sdk/bin/dev_appserver.sh you/war/directory &
Run the development server?
https://developers.google.com/appengine/docs/java/tools/devserver

Resources