Created
October 11, 2010 08:42
-
-
Save wookay/620219 to your computer and use it in GitHub Desktop.
libcat Console test script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RootViewController> cd / | |
UITabBarController> cd | |
RootViewController> ls | |
[ROOTVIEWCONTROLLER]: <RootViewController: 0x6024920> | |
NAVIGATIONITEM: <UINavigationItem: 0x6024b20; title = 'libcat'> | |
TABLEVIEW: <UITableView: 0x7042600; frame = (0 0; 320 367); clipsToBounds = YES; opaque = NO; autoresize = W+H; layer = <CALayer: 0x629d510>; contentOffset: {0, 0}> | |
SECTIONS: | |
0 [ | |
"[0] <UITableViewCell: 0x629f310; frame = (0 46; 320 45); text = 'Tests'; autoresize = W; layer = <CALayer: 0x629f440>>", | |
"[1] <UITableViewCell: 0x629f6b0; frame = (0 91; 320 44); text = 'Assertions'; autoresize = W; layer = <CALayer: 0x629f790>>", | |
"[2] <UITableViewCell: 0x62a19b0; frame = (0 135; 320 44); text = 'Failures'; autoresize = W; layer = <CALayer: 0x62a1a90>>", | |
"[3] <UITableViewCell: 0x62a1d40; frame = (0 179; 320 45); text = 'Errors'; autoresize = W; layer = <CALayer: 0x62a0310>>" | |
] | |
1 [ | |
"[0] <UITableViewCell: 0x62a2830; frame = (0 291; 320 45); text = 'Interactive Shell'; autoresize = W; layer = <CALayer: 0x62a2910>>", | |
"[1] <UITableViewCell: 0x62a45d0; frame = (0 336; 320 45); text = 'Log Watcher'; autoresize = W; layer = <CALayer: 0x62a3e30>>" | |
] | |
RootViewController> navigationController.viewControllers.count | |
[rootviewcontroller navigationController] => <UINavigationController: 0x6024060> | |
[uinavigationcontroller viewControllers] => ( | |
"<RootViewController: 0x6024920>" | |
) | |
[__nsarrayi count] => 1 | |
RootViewController> t Tests | |
[<RootViewController: 0x6024920> tableView:didSelectRowAtIndexPath: 0 0] | |
UIViewController> sleep 0.5 | |
UIViewController> b | |
[uinavigationcontroller popViewControllerAnimated: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> t 1 | |
[<RootViewController: 0x6024920> tableView:didSelectRowAtIndexPath: 0 1] | |
UIViewController> sleep 0.5 | |
UIViewController> b | |
[uinavigationcontroller popViewControllerAnimated: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> t 1 0 | |
[<RootViewController: 0x6024920> tableView:didSelectRowAtIndexPath: 1 0] | |
UIControlViewController> t 1 | |
[uiroundedrectbutton sendActionsForControlEvents: UIControlEventTouchUpInside] | |
UIControlViewController> t up | |
[uiroundedrectbutton sendActionsForControlEvents: UIControlEventTouchUpInside] | |
UIControlViewController> t 2 | |
[uiroundedrectbutton sendActionsForControlEvents: UIControlEventTouchUpInside] | |
UIControlViewController> t -1 0 | |
call | |
UIControlViewController> t -1 4 | |
call | |
UIControlViewController> sleep 0.5 | |
UIControlViewController> b | |
[uinavigationcontroller popViewControllerAnimated: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> cd Tests | |
UITableViewCell> ls | |
[UITABLEVIEWCELL]: <UITableViewCell: 0x629f310; frame = (0 46; 320 45); text = 'Tests'; autoresize = W; layer = <CALayer: 0x629f440>> | |
VIEW.SUBVIEWS: [ | |
"[0] <UIImageView: 0x62a1740; frame = (10 1; 300 10); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x62a0d40>>", | |
"[1] <UITableViewCellContentView: 0x629f650; frame = (10 1; 300 43); layer = <CALayer: 0x629f810>>", | |
"[2] <UIGroupTableViewCellBackground: 0x62a04f0; frame = (9 0; 302 45); autoresize = W; layer = <CALayer: 0x62a05c0>>" | |
] | |
UITableViewCell> contentView.backgroundColor = yellow | |
contentView => <UITableViewCellContentView: 0x629f650; frame = (10 1; 300 43); layer = <CALayer: 0x629f810>> | |
backgroundColor = yellow | |
UITableViewCell> sleep 0.5 | |
UITableViewCell> t . | |
[<RootViewController: 0x6024920> tableView:didSelectRowAtIndexPath: 0 0] | |
UIViewController> sleep 0.5 | |
UIViewController> b | |
[uinavigationcontroller popViewControllerAnimated: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> cd Tests | |
UITableViewCell> contentView.backgroundColor = clear | |
contentView => <UITableViewCellContentView: 0x629f650; frame = (10 1; 300 43); layer = <CALayer: 0x629f810>> | |
backgroundColor = clear | |
UITableViewCell> cd | |
RootViewController> cd Tests | |
UITableViewCell> text = 브왁 | |
text = 브왁 | |
UITableViewCell> t . | |
[<RootViewController: 0x6024920> tableView:didSelectRowAtIndexPath: 0 0] | |
UIViewController> view.backgroundColor = red | |
view => <UIView: 0x62c0610; frame = (0 0; 320 367); autoresize = W+H; layer = <CALayer: 0x62c7260>> | |
backgroundColor = red | |
UIViewController> sleep 0.5 | |
UIViewController> b | |
[uinavigationcontroller popViewControllerAnimated: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> cd | |
RootViewController> cd 브왁 | |
UITableViewCell> text = Tests | |
text = Tests | |
UITableViewCell> cd / | |
UITabBarController> t 1 | |
[uitabbarcontroller setSelectedIndex: 1] | |
UIControlViewController> sleep 0.5 | |
UIControlViewController> cd / | |
UITabBarController> t 0 | |
[uitabbarcontroller setSelectedIndex: 0] | |
RootViewController> sleep 0.5 | |
RootViewController> cd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /opt/local/bin/ruby1.9 | |
# encoding: utf-8 | |
require '../../libcat/Console/script/console' | |
#RUN_ALL = false | |
RUN_ALL = true | |
c = Console.new | |
rootVC = c.input 'cd /' | |
IS_TABBARCONTROLLER = 'UITabBarController> ' == rootVC | |
c.input 'cd' | |
c.input_commands <<EOF if RUN_ALL | |
ls | |
navigationController.viewControllers.count | |
EOF | |
c.input_commands <<EOF if RUN_ALL | |
t Tests # touch | |
sleep 0.5 | |
b # back | |
sleep 0.5 | |
t 1 | |
sleep 0.5 | |
b | |
sleep 0.5 | |
EOF | |
c.input_commands <<EOF if RUN_ALL | |
t 1 0 | |
t 1 # UIButton | |
t up | |
t 2 | |
EOF | |
if IS_TABBARCONTROLLER | |
c.input_commands <<EOF if RUN_ALL | |
t -1 0 # UIBarButtonItem | |
t -1 4 # UIBarButtonItem | |
sleep 0.5 | |
EOF | |
end | |
c.input_commands <<EOF if RUN_ALL | |
b | |
sleep 0.5 | |
EOF | |
c.input_commands <<EOF if RUN_ALL | |
cd Tests | |
ls | |
contentView.backgroundColor = yellow | |
sleep 0.5 | |
t . | |
sleep 0.5 | |
b | |
sleep 0.5 | |
cd Tests | |
contentView.backgroundColor = clear | |
cd | |
EOF | |
c.input_commands <<EOF if RUN_ALL | |
cd Tests | |
text = 브왁 | |
t . | |
view.backgroundColor = red | |
sleep 0.5 | |
b | |
sleep 0.5 | |
cd | |
cd 브왁 | |
text = Tests | |
EOF | |
if IS_TABBARCONTROLLER | |
c.input_commands <<EOF if RUN_ALL | |
cd / | |
t 1 # selectedIndex = 1 | |
sleep 0.5 | |
cd / | |
t 0 # selectedIndex = 0 | |
sleep 0.5 | |
cd | |
EOF | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usefull code you saved Zeokat day. Thanks.