Fitnesse: test ignored - fitnesse

When running a fitnesse test, I get see it is ignored (not run). I dont understand why. below is the code:
#!include .ActionDefinitions
!path C:\Users\rdixit\Documents\Visual~3\Projects\LearningTestAutomation\LearningTestAutomation\bin\Debug\LearningTestAutomation.dll
|!SpecFlow.ActionIO|
|start browser| firefox| of version|36|
|navigate to url|https://csb-qaprod.cornerstoneondemand.com/learning|
|login|
Can you tell me why this page is ignored?
The root page is below:
!define TEST_SYSTEM {fit}
#!define COMMAND_PATTERN {java -cp %p %m}
#!define TEST_RUNNER {fitlibrary.suite.FitLibraryServer}
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer %p}
!define TEST_RUNNER {C:\fitnesse\fitSharp\runner.exe}
#!define TEST_RUNNER {C:\fitnesse\dotnet\FolderRunner.exe}
!path C:/fitnesse/fitlibrary-2.0.jar
#!path ../bin
!path C:/fitnesse/fitnesse-standalone.jar
!path C:/fitnesse/lib/*.jar
!path C:/fitnesse/fitSharp/*.dll
!path C:/fitnesse/dotnet/*.dll
!path C:\Users\rdixit\Documents\Visual~3\Projects\LearningTestAutomation\LearningTestAutomation\bin\Debug\LearningTestAutomation.dll
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}
!include .ActionDefinitions
|Import|
|SpecFlow.ActionIO|

I found the error, when calling
|!SpecFlow.ActionIO|, I put ! inside the column. Its supposed to be:
!|SpecFlow.ActionIO|
works now.

Related

Create a .bif file with TCL script

I'm trying create a boot image with TCL script. And i can create if I create fsblTest.bif file via SDK manually. I want to create auto with TCL. How can i create .bif file using TCL ?
My code;
setws /home/nmi/workspace
app create -name fsblTest -template {Zynq FSBL} -hw zc702 -proc ps7_cortexa9_0 -os standalone
app build -name fsblTest
exec bootgen -arch zynq -image /home/nmi/workspace/fsblTest_system/_ide/bootimage/fsblTest_system.bif -w -o /home/nmi/Desktop/bootD/BOOT.bin
I solved.
Last version of my code :
setws /home/nmi/workspace
#app create with hardware,processor..
app create -name fsblTest1 -template {Zynq FSBL} -hw zc702 -proc ps7_cortexa9_0 -os standalone
app build -name fsblTest1
set outputFile [open /home/nmi/workspace/fsblTest1_system/fsblTest1.bif w+]
# .bif file content
puts $outputFile "/* /tmp/bootgen_zynq_fsbl_system16600834677826087177/sd_card_temp/boot.bif */ "
puts $outputFile "/* Command to create bitstream .bin file: */"
puts $outputFile "/* bootgen -image <bif_file> -split bin -w */"
puts $outputFile "/* Command to create BOOT.BIN file: */"
puts $outputFile "/* bootgen -image <bif_file> -w -o i BOOT.BIN */"
puts $outputFile "/*zc702*/"
puts $outputFile "the_ROM_image:"
puts $outputFile "{"
puts $outputFile "\[bootloader] /home/nmi/workspace/zc702/export/zc702/sw/zc702/boot/fsbl.elf"
puts $outputFile "/home/nmi/workspace/fsblTest1/Debug/fsblTest1.elf"
puts $outputFile "}"
close $outputFile
#boot.bin file create
exec bootgen -arch zynq -image /home/nmi/workspace/fsblTest1_system/fsblTest1.bif -w -o /home/nmi/Desktop/bootD/BOOT.bin

Fitnesse: Connection Reset

I am running tests in fitnesse with the following issue occurring:
Internal Exception:
Connection Reset
Does anyone know why this is occurring and how to fix it?
SuiteSetup contains file:
!define TEST_SYSTEM {fit}
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer, C:\GrowthEdition.QA\fitnesse\fitSharp\fit.dll %p}
!define TEST_RUNNER {C:\GrowthEdition.QA\fitnesse\fitSharp\Runner.exe}
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}
!define MANUALLY_START_TEST_RUNNER_ON_DEBUG {debug}
!path C:\GrowthEdition.QA\fitnesse\fitSharp\*.dll
!path C:\Users\rdixit\Documents\Visual~3\Projects\LearningTestAutomation\LearningTestAutomation\bin\x86\Debug\LearningTestAutomation.dll
I assume that you started Fitnesse server ok. And you are working on a Fitnesse wiki page and your test fixture.
The connection reset happens when your test is trying to connect a web server but it's failed. You may need to debug your test to see what it is connecting.
I put a guideline link for reference.
https://vikashazrati.wordpress.com/2007/12/05/remote-debugging-fitnesse-with-eclipse/

expect, assign output to buffer

#!/usr/local/bin/expect --
set env(TERM) vt100
set env(SHELL) /bin/sh
set env(HOME) /usr/local/bin
set PASSWORD eri
set DUL [lindex $argv 0]
match_max 100000
spawn ssh mashost
expect {
"assword" {send "$PASSWORD\r"}
}
expect "ranosusr#rn2osscs603"
send -- "cd /var/opt/bla/edd/ARNE_SIU \r"
expect "ranosusr#rn2osscs603"
send -- "grep -il $DUL *\r"
expect -re "$DUL.*\.xml"
set outcome $expect_out(0,string)
expect "ranosusr#rn2osscs603"
send -- "/opt/bla/arne/bin/import.sh -f $outcome -val:rall\r"
expect "ranosusr#rn2osscs603"
interact
and when I run it
ssh mahost
Password:
ranosusr#rn2osscs603> cd /var/opt/bla/edd/ARNE_SIU
ranosusr#rn2osscs603> grep -il FXLP89 *
FXLP89_FRTALZ_SIU_ARNE.xml
ranosusr#rn2osscs603> /opt/bla/arne/bin/import.sh -f FXLP89 *
Logging to file /var/opt/bla/arne/ARNE_Import_Log.2014-03-11_10:37:47
Failed to write to file. Writing to stdout instead.
The file 'FXLP89' can not be found.
ranosusr#rn2osscs603>
ranosusr#rn2osscs603>
ranosusr#rn2osscs603> FXLP89_FRTALZ_SIU_ARNE.xml -val:rall
FXLP89_FRTALZ_SIU_ARNE.xml: Command not found.
ranosusr#rn2osscs603>
and it shold be:
ranosusr#rn2osscs603> cd /var/opt/bla/edd/ARNE_SIU
ranosusr#rn2osscs603> grep -il FXLP89 *
FXLP89_FRTALZ_SIU_ARNE.xml
ranosusr#rn2osscs603>/opt/bla/arne/bin/import.sh -f FXLP89_FRTALZ_SIU_ARNE.xml -val:rall
so basicly, output of grep (name of file) I need to put in the line under as showed here, but I don't know how. I tried some suggestion from guys here, but I can't manage it still. Thanks for any help.
After you
send -- "grep -il $DUL *\r"
Expect sees all this output
ranosusr#rn2osscs603> grep -il FXLP89 *
FXLP89_FRTALZ_SIU_ARNE.xml
ranosusr#rn2osscs603>
The part that is matched by the regular expression "$DUL.*.xml" is in bold:
ranosusr#rn2osscs603> grep -il FXLP89 *
FXLP89_FRTALZ_SIU_ARNE.xml
ranosusr#rn2osscs603>
You should expect this:
set prompt {ranosusr#rn2osscs603> }
expect -re "($DUL\\S+\\.xml).*$prompt$"
set filename $expect_out(1,string)
Here, we're expecting the pattern: the value of $DUL followed by some non-whitespace chars followed by a literal dot and "xml" (capture all of that) followed by some chars and the prompt and the end of string.
The backslashes are doubled because we're using a double quoted string, and the backslashes have to be passed literally to the regex engine.

FitSharp FormatException when running tests

I installed a clean version of Fitnesse (v20121220) and the latest version of FitSharp (.net 4).
I've created a fitnesse test page but cannot get the tests to run - whenever I try, the tests immediately fail with the following stack trace in the standard output: -
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at fit.Runner.FitSocket.EstablishConnection(String request)
at fitnesse.fitserver.FitServer.EstablishConnection()
at fitnesse.fitserver.FitServer.Run(IList`1 CommandLineArguments)
at fitnesse.fitserver.FitServer.Run(IList`1 commandLineArguments, Memory memory, ProgressReporter reporter)
at fitSharp.Machine.Application.Shell.Run()
at fitSharp.Machine.Application.Shell.Execute()
at fitSharp.Machine.Application.Shell.RunInCurrentDomain(IList`1 commandLineArguments)
at fitSharp.Machine.Application.Shell.RunInNewDomain(AppDomainSetup appDomainSetup, IList`1 commandLineArguments)
And the following error as Internal Exception: -
Internal Exception:
FitClient: external process terminated before a connection could be established.
My root configuration is pretty basic: -
!define COMMAND_PATTERN {%m -a "FullPathToAcceptanceTests.dll.config" -r fitnesse.fitserver.FitServer,C:\fitnesse\fitsharp\fit.dll %p}
!define TEST_RUNNER {c:\fitnesse\fitsharp\Runner.exe}
!path "FullPathToAcceptanceTests.dll"
Obviously the FullPathToAcceptanceTests points to where my fitnesse acceptance tests code is.
I don't understand why this is happening - I've used Fitnesse / Fitsharp before without problems, but this just doesn't seem to want to work.
I think that this problem might be caused by running Fitnesse on default 80 port.
FitLibrary and Fit are sometimes using the same port, which might cause an issue.
Try using different port.
I have
!path "FullPathToAcceptanceTests.dll"
!define COMMAND_PATTERN {%m -r "fitnesse.fitserver.FitServer,C:\fitnesse\fitsharp\fit.dll" %p}
!define TEST_RUNNER {c:\fitnesse\fitsharp\Runner.exe}

Fitnesse trying to load "defaultPath" as assembly

I am trying to specify a custom converter to Slim by specifying a suite configuration.
When I manually append ?test (the button doesn't appear for some reason), I get the following exception:
__EXCEPTION__:System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Path\To\fitnesse\__defaultPath__'
Any idea why it would be trying to load "defaultPath" as an assembly from the current working directory?
Below is my suite configuration:
<?xml version="1.0" encoding="utf-8" ?>
<suiteConfig>
<ApplicationUnderTest>
<AddAssembly>C:\Path\To\TestsAssembly.dll</AddAssembly>
<AddNamespace>Tests_Namespace</AddNamespace>
<AddAssembly>C:\Path\To\fitSharp.dll</AddAssembly>
</ApplicationUnderTest>
<fitSharp.Machine.Application.Settings>
<Runner>fitSharp.Slim.Service.Runner</Runner>
</fitSharp.Machine.Application.Settings>
<fitSharp.Slim.Service.Service>
<AddOperator>NamespaceToConverter.NullableDecimalConverter</AddOperator>
</fitSharp.Slim.Service.Service>
</suiteConfig>
My Fitnesse wiki page starts like this:
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {"%m" -c c:\Path\To\SlimConfig.xml %p}
!define TEST_RUNNER {C:\Path\To\fitsharp\Runner.exe}
|import|
... etc
If you don't have a !path, it defaults to 'defaultPath', so that's what was being passed as the %p parameter. As you discovered, you should remove the %p if you don't have a !path.
I was able to work around the problem by removing the classpath parameter (%p) from COMMAND_PATTERN:
!define COMMAND_PATTERN {%m -c c:\Path\To\SlimConfig.xml}

Resources