On iOS 7, I have a test like this for calabash:
And I fill in text fields as follows:
| field | text |
| Name | Batking |
| Apt/Suite # | 87 |
| ZIP Code | 68067 |
| Location Name (e.g. Home) | Cave |
The textfields are on that view but somehow touch doesn't find them. The test fails and gives an error:
touch could not find view: 'textField marked:'Street Address'', args: {:query=>"textField marked:'Street Address'"} (RuntimeError)
Does anyone has a solution for this? Your help will be much appreciated
Try using 'tap' and tap the field by the name of the label. Example: tap 'Street Address'. If you need help finding the label name then query it. Example: change directory into your project location. Then run calabash-ios console to run the irb for your project. Then run start_test_server_in_background to start the calabash simulator. Navigate to the view that has the textField you need. Then run query("label"). Find the name of the label then run the tap command from above. Hope this helps
Related
Am using fastlane for my app and right now have configured to generate HTML reports for tests & code coverage.
Is it possible to fetch the stats as seen on command line so that I could use it to notify on separate chat app which I use ?
+------------------+---------+
| xcov Coverage Report |
+------------------+---------+
| 123456789012.app | 100.00% |
+------------------+---------+
+--------------------+---+
| Test Results |
+--------------------+---+
| Number of tests | 1 |
| Number of failures | 0 |
+--------------------+---+
You can use tools like xcov and gcovr to gather coverage data on top of fastlane. Links are as follows to the documentation:
https://docs.fastlane.tools/actions/gcovr/
https://docs.fastlane.tools/actions/xcov/
For test results, i believe there is no straight forward answer for that because the logs you see in the console are not directly exposed by Xcode.
When you are running your application, Xcode creates a file called TestSummaries.plist, which has all the steps and results.
Some of the developers were in your position, where they ended up writing a macOS application, just to parse the plist and get all the data. Following is the reference to the project.
https://github.com/nacuteodor/ProcessTestSummaries
https://github.com/KrauseFx/trainer
Lastly, go through the following article which explains how test logs are structured in the testSummaries.plist
https://michele.io/test-logs-in-xcode/
Hope all the links and explanations help you out. :)
I am using FitNesse with Xebium for documenting/running automated test scripts.
I was wondering how these test scripts can be improved e.g. by removing duplication:
|scenario |Given a customer check with status positive|
|start app with customerId|1000001 |
|scenario |Given a customer check with status negative|
|start app with customerId|1000002 |
|scenario |Given a customer check with status error|
|start app with customerId|1000003 |
(... and so on)
I have the feeling that this can be put in one table, but how?
I know its an old post, but I believe you can plan your acceptance tests something like below
|start app |
|status |given customer|whatever validation?|
|positive|1000001 |works fine |
|negative|1000002 |can not be launched |
|error |1000003 |can not be launched |
I'm getting a weird error when testing my app using Capybara and poltergeist.
/features/document.feature
#javascript
Scenario: admin users can publish documents
Given a "admin" user exists and is signed in
And the following categories exist:
| name |
| Category 1 |
And the following documents exist:
| name | id |
| Test Document 1 | 1 |
And I goto "/admin/documents"
When I toggle publish document
And I wait for index
Then Document "Test Document 1" should be published
And I should see "Document published successfully!"
Result:
Failing Scenarios:
cucumber features/admin_features/document.feature:135 # Scenario: admin users can publish documents.
I tried to debug and i'm getting the output as expected ie, Document published successfully! but i dunno why the test failed after the scenario is successful. I think its realted to some config issue.
I figured out why the scenario was failing.... Actually i degraded cucumber from 2.0.0 to 1.3.8 and it showed me the exact error. Anyways thanks Mark
I apologize in advance as I am still fairly new to powershell. I'm figuring things out as I go, but this specific issue is stumping me. Currently this is with powershell 2.0 on exchange 2007.
I am trying to add to a script that I have been writing up that shows the basic information for our exchange accounts. This is just a small tool to be introduced to our help desk to assist in a quick overview of what is going on with a user's account. I have everything working, however, I want to change what is displayed. For example, I have:
Get-Mailbox $username | ft #{label="Hidden from GAL"; expression= {$_.HiddenFromAddressListsEnabled}}, #{label="Restricted Delivery"; expression={$_.AcceptMessagesOnlyFrom}} -auto | out-string;
Which ends up returning true/false for hidden from address list, but for Accept Messages, if it is disabled, it returns "{}" (without quotes). If it is enabled, it displays the full group name (along the lines of admin.local/groupname). I only want to change {} to disabled, and instead of showing the group name, just show "enabled"
I tried an if/then statement, and then tried putting the variable "messRestrict" in the expression for accept messages above, and then the function name, but neither worked. They just returned blank values or always said "true." Here is the function:
function restricted {
$accept = Get-Mailbox $username | AcceptMessagesOnlyFrom | select -expand Priority
#if ($accept -match "\s")
#{$messRestrict="False"};
#else
#{$messRestrict="True"};
}
The output is the standard Get-Mailbox output, I just want to replace what it says under the header.
Thanks!
You can try this :
#{label="Restricted Delivery"; expression={if($_.AcceptMessagesOnlyFrom){"Enabled"}else{"Disabled"}}}
It gives :
Get-Mailbox $username | ft #{label="Hidden from GAL"; expression= {$_.HiddenFromAddressListsEnabled}}, #{label="Restricted Delivery"; expression={if($_.AcceptMessagesOnlyFrom){"Enabled"}else{"Disabled"}}} -auto | out-string;
I have a strange problem: My Delphi application raises an EOutOfRessources exception just after starting up on a Application.CreateForm call. Is somebody out there, who solved such a problem?
The strange things are
that this happens on a single machine only. I do not have this
problem on other computers
that the application runs properly, if a teleservice is active (we use Danware NetOP). If teleservice is not running (Netop waits for a guest log in), the application fails.
The application was developed under D7; OS is WinXP SP3.
Thanks for your help
--- Update 1 ---
Application uses EurekaLog to catch exceptions and to store error information. It says, the EOutOfRessources happens on Application.CreateForm (some 50 forms already created, a few other forms pending to create), the message is "out of system ressources". Exception address is 7C81EB2E.
The EurekaLog also provides the call stack :
|*Exception Thread: ID=2088; Priority=0; Class=; [Main] |
|-----------------------------------------------------------------------|
|7C81EB2E|kernel32.dll| | | | |
|77D56C4F|user32.dll | | |CreateIcon | |
|7C9205D4|ntdll.dll | | |RtlAllocateHeap | |
|7C9110ED|ntdll.dll | | |RtlLeaveCriticalSection| |
|77D2058E|user32.dll | | |SystemParametersInfoA | |
|77D205A3|user32.dll | | |SystemParametersInfoA | |
|7C809AE4|kernel32.dll| | |VirtualAllocEx | |
|7C809AA2|kernel32.dll| | |VirtualAllocEx | |
|7C809A94|kernel32.dll| | |VirtualAlloc | |
|0060E359|_765013.exe |_765013.dpr| | |235[58]|
|7C91E64C|ntdll.dll | | |NtSetInformationThread | |
-------------------------------------------------------------------------
Total memory use is about 60 MB; the application has some 20 MB in use.
I do not know the used number of handles; EurekaLog does not provide this.
--- Update 2 ---
Now we exchanged the PC by another one of same type. The exception did not raise again. However, we had a similar effect on another machine, now not being able to open a file during Application.CreateForm. The file name string was empty ... After a number of poor people resets (power shut down) the problem disappeared.
We suspect, that the exceptions are caused by a network problem. At this customer, we have four applications running (per two identical projects). They share data over a company network; for that there is a NAS. Network login is done with Windows start up, about 2 minutes before starting the applications.
Teleservice runs over company network too.
The question is now, if Application.CreateForm is trying to get connected to network. Our OnCreate event handlers do not require an open network.
The applications' source code is on the NAS too (encrypted by TrueCrypt). After compilation we copy the EXE and all other needed files to a local hard drive and run the application from that place. Normally, the TrueCrypt container is closed.
Could it happen, that the EXE is searching for some files on NAS resp. the TrueCrypt container?
Maybe, somebody is familiar with such issues. Thanks for your help.