.

ISSUE | SOLVED - Calabash/Cucumber -malformed UTF-8 character (ArgumentError)


C:\Users\Kamal\Downloads\DevKit\new-calabash-test>calabash-android run w2pNew.apk --format html --out reports.html
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows
malformed UTF-8 character (ArgumentError)
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step.rb:81:in `unpack'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step.rb:81:in `text_length'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step_invocation.rb:160:in `text_length'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step_collection.rb:62:in `block in max_line_length'

C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step_collection.rb:62:in `map'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/step_collection.rb:62:in `max_line_length'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/has_steps.rb:53:in `max_line_length'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/has_steps.rb:49:in `source_indent'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/scenario.rb:28:in `accept'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:58:in `block in visit_feature_element'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:57:in `visit_feature_element'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:38:in `block in accept'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/feature.rb:37:in `accept'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:27:in `block in visit_feature'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:26:in `visit_feature'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:28:in `block in accept'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:17:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/features.rb:27:in `accept'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:21:in `block in visit_features'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:170:in `broadcast'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/ast/tree_walker.rb:20:in `visit_features'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/runtime.rb:49:in `run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/lib/cucumber/cli/main.rb:47:in `execute!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.20/bin/cucumber:13:in `<top (required)>'
C:/Ruby193/bin/cucumber:23:in `load'
C:/Ruby193/bin/cucumber:23:in `<main>'




Answer:

You may see this error if you do not launch the app using

start_test_server_in_background


Here are steps involved:

1. Open cmd.

2. Change the directory to the test directory where you have apk and Feature folder.

3. Then execute this command:

calabash-android console abc.apk

C:\Users\abc\Downloads\DevKit\new-calabash-test>calabash-android console abc.apk
Starting calabash-android console...
Loading C:/Ruby193/lib/ruby/gems/1.9.1/gems/calabash-android-0.5.14/irbrc
Running irb...
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows


4. Then execute this command:
 
start_test_server_in_background
 
start_test_server_in_background
 => nil

No comments :

Post a Comment

Recent Posts