PowerBoots is a very useful example of DSL which exploits script blocks to create GUIs:
Boots {
StackPanel {
Button "A bed of clams"
Button "A coalition of cheetas"
Button "A gulp of swallows"
}
}
I know that without specifying a target Domain this question appears very general. So I'm going to make it more specific:
Do you know any other project implementing a kind of DSL in powershell?
You should also look at psake: https://github.com/JamesKovacs/psake
Also, I just found Pester, which is the PoSh answer for RSpec: https://github.com/pester/Pester
Another example: Windows PowerShell: A Better XML
Here's an example of a DSL for XML in PowerShell. Here's a blog post by Jeffrey Snover about DSLs in PowerShell (look at the comments for more links).
I tried PowerShell as DSL script for a C#.Net application and my experience has posted here. .PowerShell is really powerful when it comes to DSL world.
Related
Our dev team provides us an Ansible package to work with. I noticed thy develop a custom stdout_callback and I'm trying to understand it.
I'm looking at the code of the class CallbackBase available here and I noticed the result variable but I can't find a description of it's content.
Is there a place I can find such information?
Next question, how does Ansible call such callback? CallbackBase contains several methods but I'd like to know where those methods are called.
Thanks for your feedbacks
I need to know the language, which is used in BMC Remedy User (WMSTI) macros? The tool is called 'BMC Remedy User' (WMS-TI within the company (Telekom)).
Here are some code snippets from the macros which are standardly implemented:
Form-open:
Form-entry-list: 0
Form-final: modify#
end
and another snippet:
[wordrecord]
Path=C:\Program Files\Microsoft Office\OFFICE12\winword.exe
Application=winword
Topic=system
Format=Record
CharsPerLine=100
XFRDATA=Clipboard
Command1=[FileNew .Template="Normal", .NewTemplate = 0]
Command2=[Editpaste]
What kind of language is this and is there any learning material?
BMC Remedy User tool is not supported but developer can install it locally to ease their work.
apart from this, have a look on-https://communities.bmc.com/docs/DOC-28466
Remedy User Tool macro language is proprietary.
Since Remedy User Tool is not supported anymore, I'd encourage you to use updated technologies, like SOAP or REST (for everything back-end), or AngularJS (for everything front-end)
Another solution would be to use tools created by the Remedy Community, like the one appearing on https://communities.bmc.com/message/437693#437693
Doing some research with regards to application framework used on the SUT am going to LoadTest using Loadrunner I fond the application is developed using wickets.
I have generated script using web http/html protocol against a wicket
application and there was some calls recorded in the following
format,script is failing at this URL when i ran the script in VUGen.
http://somem/nnnweb/main/ ?
wicket:interface= :1:someSearchForm :someSearchForm :searchInfo: :IActi
vePageBehaviorListener :0:&wicket: ignoreIfNotActiv e=true&random=
0.038901654740178815",
I find out like when i generate the script which has just views(
viewing tabs) is working fine, but when i edit somefileds and submit
the script is generating the above calls ( http://xxx...) and failing
This guy has explained just the same issue here:
http://tech.groups.yahoo.com/group/LoadRunner/message/27295
I hope it is ok to refer other sites in Stackoverflow?
General question. Does loadrunner support testing of wicket application and is TruClient the best choice here? I actually got it to work with TruClient, but as I understand there are drawbacks with memory footprint using TruClient, but maybe it is time to move on to next generation protocol given my project has decided to use wicket framework?
I was googling a lot in order to find a solution for my problems with UI Automation. I found a post that nice summarizes the issues:
There's no way to run tests from the command line.(...)
There's no way to set up or reset state. (...)
Part of the previous problem is that UI Automation has no concept of discrete tests. (...)
There's no way to programmatically retrieve the results of the test run. (...)
source: https://content.pivotal.io/blog/iphone-ui-automation-tests-a-decent-start
Problem no. 3 can be solved with jasmine (https://github.com/pivotal/jasmine-iphone)
How about other problems? Have there been any improvements introduced since that post (July 20, 2010)?
And one more problem: is it true that the only existing method for selecting a particular UI element is adding an accessibility label in the application source code?
While UI Automation has improved since that post was made, the improvements that I've seen have all been related to reliability rather than new functionality.
He brings up good points about some of the issues with using UI Automation for more serious testing. If you read the comments later on, there's a significant amount of discussion about ways to address these issues.
The topic of running tests from the command line is discussed in this question, where a potential solution is hinted at in the Apple Developer Forums. I've not tried this myself.
You can export the results of a test after it is run, which you could parse offline.
Finally, in regards to your last question, you can address UI elements without assigning them an accessibility label. Many common UIKit controls are accessible by default, so you can already target them by name. Otherwise, you can pick out views from their location in the display hierarchy, like in the following example:
var tableView = mainWindow.tableViews()[0];
As always, if there's something missing from the UI Automation tool that is important to you, file an enhancement request so that it might find its way into the next version of the SDK.
Have you tried IMAT? https://code.intuit.com/sf/sfmain/do/viewProject/projects.ginsu . It uses the native javascript sdk that Apple provides and can be triggered via command line or Instruments.
In response to each of your questions:
There's no way to run tests from the command line.(...)
Apple now provides this. With IMAT, you can kick off tests via command line or via Instruments. Before Apple provided the command line interface, we were using AppleScript to bring up Instruments and then kick off the tests - nasty.
There's no way to set up or reset state. (...)
Check out this state diagram: https://code.intuit.com/sf/wiki/do/viewPage/projects.ginsu/wiki/RecoveringFromTestFailures
Part of the previous problem is that UI Automation has no concept of discrete tests. (...)
Agreed. Both IMAT and tuneup.js (https://github.com/alexvollmer/tuneup_js#readme) allow for this.
There's no way to programmatically retrieve the results of the test run. (...)
Reading the trailing plist file is not trivial. IMAT provides a jUnit like report after a test run by reading the plist file and this is picked up by my CI Tool (Teamcity, Jenkins, CruiseControl)
Check out http://lemonjar.com/blog/?p=69
It talks about how to run UIA from the command line
Try to check the element hierarchy, the table can be placed over a UIScrollView.
var tableV = mainWindowTarget.scrollViews()[0].tableViews()[0].scrollToElementWithName("Name of element inside the cell");
the above script will work even the element is in 12th cell(but the name should be exactly the same as mentioned inside the cell)
I want to use Powershell to write some utilities, leveraging our own .NET components to handle the actual work. This is in place of writing a small console app to tie the calls together. My question is where I would find a good source of documentation or tutorial material to help me fast track this?
If you want to load an assembly into your PowerShell session, you can use reflection and load the assembly.
[void][System.Reflection.Assembly]::LoadFrom(PathToYourAssembly)
After you load your assembly, you can call static methods and create new instances of a class.
A good tutorial can be found here.
Both books mentioned by EBGreen are excellent. The PowerShell Cookbook is very task oriented and PowerShell in Action is a great description of the language, its focus and useability. PowerShell in Action is one of my favorite books. :)
The link that Steven posted is a good example. I don't know of any extensive tutorial. Both the Windows Powershell Cookbook and Windows Powershell In Action have good chapters on the subject. Also, look at the ::LoadFromFile method of the System.Reflection.Assembly class in case your in-house assemblies are not loaded in the GAC.
you can use [] or use add-type -AssemblyName "System.example" to use assembly for example use :
[system.drawing]::class ...