Most of the Cordova plugins have a folder called 'tests', which hosts plugin.xml and tests.js. Can anyone shed some light on how to run them, and what is required to run? There seems no relevant documentation. Thanks!
There's an official Cordova library for running the unit tests.
From the Cordova Plugin Test Framework on github:
The org.apache.cordova.test-framework plugin does two things:
Defines the interface for cordova plugins to write tests
Provides a test harness for actually running those tests
Tests run directly
inside existing cordova projects, so you can rapidly switch between
testing and development. You can also be sure that your test suite is
testing the exact versions of plugins and platforms that your app is
using.
Visit that page; there's plenty of information there on running existing tests and using the framework for your own plugins.
There is also a plugin called cordova-paramedic, based on cordova-test-framework which automates manual steps like modifying config.xml:
cd cordova-plugin-name && npm install cordova-paramedic && node node_modules/cordova-paramedic/main.js --platform android --plugin ./ --verbose
Related
I have a pretty standard Ring application with some Compojure RESTfull endpoints. We also have a frontend application based on Polymer, Bower and Gulp. So I thought it would be nice to distribute this application in one package (which means having a build which will in the end produce a WAR file consisting of both backend and frontend part which can be uploaded anywhere without any other dependencies).
However I started to dig into the Leiningen and apparently there is no plugin which would support this need. So before I am gonna build something like that on my own, is there some other way how to do this? Or am I thinking about the problem in the wrong way?
P.S. The ultimate goal is to deploy application to AWS, I've done it already via elastic-beanstalk plugin and it seemd to me pretty smooth (just build the WAR, pass it to the plugin and it will take care about the rest).
I have built projects with similarities. I avoided using leiningen/lein-plugins to build the frontend and instead built it with webpack, while letting lein compile the clojure into an uberjar. The build artifacts from webpack were output to the resources path that was declared in project.clj and packaged into an uberjar. The web server was also bundled in the uberjar and was configured to serve from that path. I used luminus as a project template.
It seems like you could do something similar here. Use gulp to build the frontend and package into a war that can be deployed to elastic beanstalk. My build script from package.json was this: npm install && NODE_ENV=production webpack -p && lein uberjar.
So, you don't need to have a lein plugin to build your frontend. I found it easier to let another build tool do that work.
I want to run my test suite from pycharm to run automatically whenever new build is released . We are using jenkins for CI. I want to integrate pycharm with jenkins but not sure how to do it.
What kind of test suite do you have? What kind of version control are you using? Where are you hosting your code?
PyCharm's Jenkins plugin will show you the status of your builds. But you'll still need to configure Jenkins to run your test suite. (There's a tutorial for setting up Jenkins for Python testing here: http://www.alexconrad.org/2011/10/jenkins-and-python.html)
We're using the hosted build agent on VSTS to build and release our ASP.NET Core code to Azure App service.
My question is: can we run WebPack to handle front-end tasks on this hosted build on VSTS or do we have to do it manually before checking the code into our repository?
Update:
I'm utilizing the new ASP.NET Core Build (Preview) template that's available on VSTS -- see below:
Here are the steps -- out of the box:
For VSTS we're working on an extension, currently it's in beta phase, you can ask for a share.
Check the VSTS marketplace.
Check this github repo.
Webpack is definitively not a first class citizen for VS2015 and VSTS. Streamlining webpack for CI/CD has been a real headache in my case, especially as webpack was introduced hastily to solve dreadful performance issues with a large monolithic SPA (ASP.NET 4.6, Kendo, 15,000 files, 2000 folders). To cut short, after trying many scenarios to make sure that freshly rebuilt bundles would end up in IIS and Azure webapp, I did a 2-pass build. The sequence of VSTS tasks is as follows: npm install global, npm install local, npm webpack install local, npm webpack install global, build pass 1, webpack, build pass 2, etc... This works with hosted and private agents, providing you supply the proper path for webpack as webpack is installed in a different location in host and in private (did not find a way to chose the webpack install location for consistency). I scorch everything before starting the build. Also need to do these in VS2015 solution : (1) unload "built" folder, and (2) Add Content Include="Built\StarStar" in project file. The "built" folder contains the bundles and should appear greyed, otherwise more bad surprises and instabilities to deal with...
Build-Pass #2 task in VSTS BUILD allows to collect the fresh bundles generated by Build-Pass #1 and includes them automatically in the package to be published.
Without a second build-pass, collecting the bundles and merging them in the zip package is a nightmare, especially when you have 15,000 files to unzip then rezip (300 ms per file!!). Did not find file-merging capability that I could readily use in VSTS.
I have my hears to the ground listening for someone coming up with a more efficient CI/CD scheme for webpack. In the meanwhile, my 2-pass-build workaround is working flawlessly, but slow indeed.
I anticipate that the advances with ASP.NET core, Angular 2 and webpack will look into solving this elegantly.
I am using NUnitLite for unit tests in Xamarin android project. I can run the unit tests in debug mode on device or emulator by starting the project in VS, which will install the application and I can run tests on device/emulator.
I need to automate this in build process. How to automate this NUnitLite Testcases?
I am following the approach below:
Create a class extending from Xamarin.Android.NUnitLite.TestSuiteInstrumentation, and add the test assembly in OnCreate method.
Install the app in device.
Run the test cases using below command from ABD:
adb shell am instrument -w com.package,mypackage/app.tests.TestInstrumentation
Is this approach correct? Or can this be done any simpler way from NUnitLite itself?
We use maven to deploy the code changes to cq interner server / CRX Lite and the problem here is that it takes long time where the changes itself is often only one line code.
Has somebody experience with CQ5 with jetty and can give me a good Guide?
am not sure i understand the relationship with jetty (which ships as servlet container of latter versions of AEM/CQ5), but will answer to the code deployment part:
deploying a full content package (full content) should be done using
maven-content-package plugin for smaller deployments of content,
when you can't use integrated dev environments like sling eclipse dev
tools, i'd suggest you use the excellent repo command that basically zips the current folder and deploy it. I'm using it as an external tool command of intellij and it's really fast.
finally, if the deployment you're referring to is osgi deployment, maven sling plugin can help you with that (will still compile/package the whole osgi bundle though)