How to setup a custom keybinding to run a script or execute a command in Atom editor? - key-bindings

Is it possible to make CMD+T keybinding run a bash script? Like for example i want to run my tests on my Heroku project, the command python manage.py test would be run if did CMD+T.

Click on Packages --> Commmand Palette --> Select Toggle.
Type Install Packages and Themes.
Search for process-palette and then install it.
Click on Packages --> Process Palette --> Select Toggle
Create a global configuration or a project specific configuration with the respective Do it! buttons. It will create an example configuration file and open it in the graphical editor
From the graphical editor, you can then configure the command you want and assign a shortcut to it :
Process-palette documentation

Related

TFS Build: accessing custom MSBuild file within sequence control flow

I am having hard times attempting to perform the simplest operation: run the custom MSBuild script (placed within dedicated "BuildScripts" folder) from the Lab test running build definition. What it is supposed to do prior to test execution is to trigger the child build, get the built sources and perform the modification of the config file by the means of MSBuild script. And that is what I struggle with. Supposing I have specified the build scripts folder among source settings (mapped to $(SourceDir)) and I use the MSBuild activity for running the script, what do I specify in the path for project file location?
Would appreciate any hints you might share.
Thank you.
If I understand your requirement correctly, you can select the MSBuild script file in Build Process as soon as you have uploaded the file into Version Control.
Clicking the button below:
You will get a dialog to select the solution or project you want to build:
And then click "Add..." button, you will be able to select the file from Version Control.
Never heard the "MSBuild script". If you mean to run powershell script during the build. So where do you want to specify the path for project file ? In the script or the configuration of the build template ? Suggest you to provide a screenshot.
Moreover, you can use "invokeprocess" workflow activity to invoke powershell script during the build.

How can I run WebDriver script using Ant?

I'm new to WebDriver. I have created data driven framework for Google calculator, Search, Sign in and sign up functionality with JUnit lib.
I want to run my script using Ant.
Below is the configuration for my environment:
OS: win8
Selenium-server-standalone-2.38.0.jar
Junit 4
Apache Ant 1.7
Please help.
Here are the steps to run it via ANT:
Check that you have ant installed in your system, properly. Open Command Prompt and type ant, if you have it installed perfectly it print in command prompt build.xml doesn't exist and/or Build failed
But if none of above messages displayed you need follow below steps:
1.1 Right Click My Computer icon and go to properties
1.2 Go to Advanced System Settings >> Advanced tab >> click Environment Variables under Start up and recovery
and create a new variable ANT_HOME and give ant directory path to it
1.3 Edit Path variable and add ant's bin directory path to it (do not add/remove path already present in their)<>See pictures below to set it properly:>
Once point one is done, go to your project's directory and open command prompt there (shift+right click will give option to open command prompt in working directory).
Now type ant "target name in your build.xml" example: ant run
Assuming you are aware of Ant you can run it through build.xml file.

workflow for xpages installation

I am trying to install prerequisties for workflow for xpages.I could not pass the below requirement. I installed ant, set the home pates, it works for a simple echo like "ant -build c:\test.xml"
Where is the setup folder to run "ant setup.activiti" command? it is not in ant"apache-ant-1.9.2" folder?
Make sure Apache Ant installed in the system, go to setup folder and run command(This
will download Activiti libraries needed in our project): ant setup.activiti
In setup there is the build.xml file ant uses. setup.activiti is a target inside that ant file. You only need to do that when you want to mess with the source build from source / contribute

Setting Test Runner Tool via configuration with SpecFlow

In a project using SpecFlow with this configuration:
<unitTestProvider name="MsTest.2010" />
The tests work normally when using only the default Visual Studio setup.
After installing ReSharper, the context menu commands "Run SpecFlow Scenarios" and "Debug SpecFlow Scenarios" stop working; when selected, nothing happens.
It seems this is because ReSharper sets its own test runner as default. The workaround is to open the options dialog (Tools | Options | SpecFlow | Default) and in the "Test Execution" section, set "Test Runner Tool" explicitly to "MsTest".
Unfortunately, when setting up new development machines, sometimes we forget to set this and the tests stop working after installing ReSharper, and someone has to remember this is the workaround.
The question is: would it be possible to set the "Test Runner Tool" option in the configuration file so it stays with the project, and not in the user settings? Is that what the runtimeProvider property of the unitTestProvider setting is for?
I know you asked about VS2010, but given the age of your question, I thought I'd try it in VS2012. I was able to get SpecFlow to work with MSTest without altering the Tools\Options\SpecFlow\Test Runner Tool setting (i.e. leaving it at "Auto"):
Install SpecFlow Extension to Visual Studio 2012
Select Tools\Extension and Updates
Search for "Specflow"
Install the extension
Re-start Visual Studio 2012 (SpecFlow menu items might not show up until you do this)
Create new class library project (e.g. MyProject.spec)
Add Specflow package via nuget
Right-click the project references node
Select Manage NuGet Packages
Search for "Specflow"
Select "Install"
Configure SpecFlow
Open the app.config file
Add the following entry:
Right-click the project references node
Add the following entry inside the <specFlow> node: <unitTestProvider name="MsTest" />
Create a new feature
Right-click the project node
Select Add\New Item\SpecFlow Feature File
Add the unit test assembly to the project
Right-click the project references node
Select "Add Reference"
Search Assemblies for "Microsoft.VisualStudio.QualityTools.UnitTestFramework"
Add the assembly
Generate Step Definitions
Double-click the features file to open it
Right click the white space at bottom of the features file
Select "Generate Step Definitions"
Run the tests
Select Test Explorer\Run All
Tests should run normally at this point

how do I use ant build to execute exportReleaseBuild task in Flash Builder 4

I'm trying to do an Ant build with FlashBuilder 4 for an Export Release Build. There is supposed to be a new (in FB4) ant task fb.exportReleaseBuild that will execute the release build. Reference to the usage is here:
http://help.adobe.com/en_US/flashbuilder/using/WSbde04e3d3e6474c4-59108b2e1215eb9d5e4-8000.html
When I include a target
..target name="exportRelease"
fb.exportReleaseBuild project="${flexproject}" ...
I generate an error indicating that the task can't be found:
Problem: failed to create task or type fb.exportReleaseBuild
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any presetde/macrodef declarations have taken place.
I look in flexTasks.jar and it doesn't include any flex.ant.exportReleaseBuild class despite having the latest jar.
Am I wrong in assuming I can run the exportReleaseBuild from an ant script?
You have probably solved this by now, but here's the answer in case someone else needs it.
The Ant compiler is telling you that it can't find the ExportReleaseBuild task. The reason is that when Ant is run from the IDE, it runs as a separate process to Flash Builder. When you run it from the command line it runs in the same process, which is why it works.
To get this to work in the IDE:
Open the build.xml file in Flash Builder
Go to Run -> External Tools -> External Tools Configuration...
Select Ant, then click the New Launch Configuration button
Enter a name for the build task
Select the Main tab:
Browse to the location of the build file
Browse to the location of the workspace
Select the JRE tab, then tick "run in the same JRE as this Workspace" (see image below)
Click Apply, then click Run
In future you can run the the task using the icon on the toolbar:
Just came across this situation myself, and after tweeting w/ #renaun (his blog post has some info as well: http://renaun.com/blog/2010/09/command-line-build-a-flash-builder-4-premium-feature/), it's pretty much useless for a CI build, unless you want to install FB4 premium, you can't run this task.
I was able to get it to run on my OSX environment by following the Adobe docs for it, but it doesn't mention that you have to basically run it from the command line tool. The ant that is installed as a plugin w/ the premium version has an importexport-ant.jar that is being referenced by Eclipse (standalone or plugin).
The only way I got it to run was via cmd line/terminal. It is tedious, and not really useful for a CI build. I did try to just grab the jar file, place it in the right spot, reference that in my ant script and build directly, but that made my compiler angry :(
I think I cracked it by setting up a shell script, and calling the shell script from an ant task.
This way you * are * using the headless Flash Builder modus, from within Flash Builder.
Full working example at:
https://gist.github.com/1077715
Thanks for the link lordB8r, that one got me thinking : )

Resources