bdd

Multiple tests with minitest

只谈情不闲聊 提交于 2019-12-11 08:46:06
问题 I have an app with some specs written into minitest. As usual, I start them using rake . Because some times I got a random results, my specs can pass one time, and fail an other time. In this case, I can keep the sequence number and replay it later, after fixing. Because I have this kind of tests (with a random result), I generally run rake many time, just to be sure that the app is okay. I would like to know if there is a nice way to perform multiple rake tests (100 times for example), and

How to stop JBehave from trimming multiline parameters?

懵懂的女人 提交于 2019-12-11 07:26:22
问题 I have a step where I need to check certain message. I used a multi-line parameter: Then I see welcome message: 'Welcome to our site! Some more text Even more text' Problem is that message should have spaces at the end of first and second lines (IDK why, but it should). And JBehave trims spaces from each line. So test fails. How can I set it not to trim this parameter? I've tried writing \n instead of actual line-breaks, but it wasn't replaced with line-breaks Also tried adding {trim=false}

Disable the TestResults folder

穿精又带淫゛_ 提交于 2019-12-11 07:26:17
问题 How can I configure SpecFlow to stop writing logs to the TestResults folder? I have spent the last few hours reading the documentation and I have also looked here: http://specflow.org/documentation/Configuration/ However, I am unable to find an answer. I assume there must be an app.config setting? Here is my app.config: <specFlow> <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --> <!-- For additional details on SpecFlow configuration

Valid BDD Scenario Steps? Given -> When -> Then -> When

拥有回忆 提交于 2019-12-11 06:45:07
问题 If I have the following steps defined, is this valid scenario? I feel like it is some kind of smell. Scenario: Change users status Given I have the following users exist: | code | status | | u1 | active | | u2 | inactive | | u3 | active | And the status filter is "active" When I update "u1" to "inactive" Then I should see the following users: | code | | u3 | When I change status filter to "inactive" Then I should see the following users: | code | | u1 | | u2 | 回答1: Liz is right about

how to select a picture from UIImagePickerController using Frank Cucumber?

痞子三分冷 提交于 2019-12-11 06:44:48
问题 I was trying to use BDD technique to check the import picture process using Frank in the iPhone Simulator. The problem is that I cannot call the last step of selecting an image from UIImagePickerControllerSourceTypePhotoLibrary source (launching the UIImagePickerController was very easy using "touch"-commands on a button). It always stuck in the progress when I can see the saved images in the Simulator. The Frank Symbiote said the object I wanna touch is a "PLAlbumViewCell" object. 回答1: I

How to inspect the session hash with Capybara and RSpec?

六月ゝ 毕业季﹏ 提交于 2019-12-11 04:16:45
问题 Found various posts about this on Stack Overflow, but didn't find a solution. From within an integration test, how to inspect the session hash with Capybara and RSpec? puts session.inspect throws an undefined method for nil error. 回答1: Based on your comment you need debugging so you can use: save_and_open_page to take a snapshot of a page and take a look at it, or you can use: print page.html if you want to retrieve the current state of the DOM as a string Source: Capybara debugging 来源: https

Logging value of a variable in MonkeyTalk IDE Javascript file

孤人 提交于 2019-12-11 03:43:04
问题 I'm using MonkeyTalk IDE Beta2 for testing iPad application. I exported the javascript from the MonkeyTalk IDE and got a new .js file. I am storing the Boolean value of a Verify command in a var and want to see what is its value, and accordingly do custom logic. I tried document.write , console.log and alert used in javascript but got an error that they are not defined. Please help me with this. Also, is it possible to output the result of a test as XML (as in FoneMonkey) or as an Excel

Dealing with a large string in Gherkin with Scenario Outline

走远了吗. 提交于 2019-12-11 03:32:12
问题 I'm using Behat for BDD and using Scenario Outlines so I can easily do the same test with other data. But I got a problem with large texts. See example below: Scenario Outline: create a thing When I click on "New" Then I should be at "/thing/new" When I fill in "title" with <title> When I fill in "description" with "description" When I click on "save" Then I should be at "/things" Then I should see <title> in the list When I click on <title> Then I should see <title> Then I should see

How to test internal functions, which are needed for internal purposes, using Jasmine

我的未来我决定 提交于 2019-12-11 03:17:42
问题 (function(window,document){ var _trimString = function( string ){ var trimString; trimString = string.replace(/^\s+|\s+$/g,''); return trimString }; var displayCorrectText = function( incorrecttext ){ correctText = "."+incorrecttext; document.write( correctText ); } var Circular = function(){}; Circular.prototype.init = function( string ){ displayCorrectText( _trimString( string ) ); }; var circular = new Circular(); window.circular = circular; })(window,document); circular.init('asd.asd'); I

Unit tests don't call viewDidAppear method

こ雲淡風輕ζ 提交于 2019-12-11 03:12:56
问题 I am using Specta to create some tests but I don't seem to be able to get this basic one to pass. The app itself works fine but this test won't pass. ViewController - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self showLogin]; } - (void)showLogin { [self presentViewController:[ETLoginVC new] animated:NO completion:nil]; NSLog(@"PresentedVC: %@", [self.presentedViewController class]); } This logs: PresentedVC: ETLoginVC Specs #import "Specs.h" #import "ETLoadingVC.h"