-
Notifications
You must be signed in to change notification settings - Fork 0
GUI testing cases *does not include example app tests #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rhit-jungh
wants to merge
126
commits into
main
Choose a base branch
from
GUI-Testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
3a00220
make the example code a buildable project
fulformc 6a82309
add a development guide
fulformc 0dfce07
UI now adjust accordingly if it's dark mode
aurvyn 5d9bfbd
fixed colors on force dark mode
aurvyn fc6a50d
Added 3 examples using theme options
aurvyn ae0d9f1
Added `theme` to the Props section
aurvyn 2fda76b
Removed the functionality to force light/dark mode
aurvyn 154ab06
remove starter README file from example app
fulformc cc84c99
Merge pull request #6 from rhventures/fulformc/development-build-process
rhit-jungh 1088b81
Dropdown arrow now uses unicode instead of png
aurvyn 887435f
Removed unused imports
aurvyn c8dc640
MultiSelect: Replaced commas with highlights
aurvyn a4fe1e8
The default text is no longer highlighted
aurvyn 4a58466
Removed unnecessary StyleSheet.flatten calls
aurvyn b16953a
added transparency to arrow background
aurvyn d1f7181
Darkmode bugfix (#7)
aurvyn 2513b85
Doc Updates (#10)
aurvyn 6e9c9df
MultiSelect UI enhancement (#8)
aurvyn c3f902d
re commit after removing apk
rhit-jungh abd095e
Integration with scrolls working with top selector
rhit-jungh c878c53
Integration test cases refactored
rhit-jungh 23b60e9
singleSelectIntegration refactored
rhit-jungh 2f174d0
change of file name
rhit-jungh d50804e
single integration test complete
rhit-jungh 2dc3c1b
scroll and multi select integration
rhit-jungh db89ee0
dynamic display check test
rhit-jungh 8e80473
MultiSelect Extend Overflow (#9)
aurvyn 98ff42f
dynamic scrolling test functional
rhit-jungh 3e213fd
Dynamic Testing Functional
rhit-jungh d043b11
Test file names changed
rhit-jungh 2fef207
System Algorithm test
rhit-jungh bf62ecd
starting documentation
rhit-jungh 5d972b1
check
rhit-jungh c6b07f7
hyperlink
rhit-jungh e35e9d2
Documentation Check
rhit-jungh 54c6dc5
documentation check
rhit-jungh 3157ab3
generating debug app
rhit-jungh 2c342f6
doc check
rhit-jungh c813683
Documentation image testing
rhit-jungh 57ad828
WDIO config docs
rhit-jungh 4cd0264
file config docs
rhit-jungh d24e7ce
doc check
rhit-jungh 14a2302
doc check
rhit-jungh ce0f10f
doc check
rhit-jungh 79dc5fe
doc check
rhit-jungh bbf8636
doc check
rhit-jungh dafbb79
Appium Inspector set up docs
rhit-jungh 5371257
Appium Inspector Docs
rhit-jungh 72df414
Doc Check
rhit-jungh 0716d55
doc check
rhit-jungh dd86242
Using Appium Inspector Documentation
rhit-jungh 0166fe3
Docs done for set up
rhit-jungh 021a482
doc edits
rhit-jungh 97414b1
change
rhit-jungh 8e762fb
ios test start
rhit-jungh f78ad3b
configs changed
rhit-jungh c011344
connection success
rhit-jungh d867d34
Update README.md
rhit-jungh f33d99c
connects to the wdio
rhit-jungh ed93f0f
first test for ios passes
rhit-jungh 3938fbd
Merge branch 'GUI-Testing' of https://github.com/rhventures/react-nat…
rhit-jungh 6b4d261
single select for top bar in iOS testing passes
rhit-jungh 1cefc7a
update docs
rhit-jungh 9c2682a
MultiSelect Split on Comma Bugfix (#12)
aurvyn 40dd73d
unit test for the small bar passes
rhit-jungh aff86b6
multi select test passes
rhit-jungh 079c1e4
scroll and select for single select passes
rhit-jungh e41eedd
Integration Single Select Refactored
rhit-jungh df65f04
scroll and select functional for ios Testing
rhit-jungh 2dabc74
Integration testing for multi select passes
rhit-jungh f8b9b7c
documentations for iOS testing
rhit-jungh 22af802
update ReadMe Docs
rhit-jungh 7054b0c
update doc image
rhit-jungh e58bbd8
Inherit Custom Styles (#13)
aurvyn 0e71948
starting Dynamics testing
rhit-jungh 1a46a2f
dynamic select test functiona;
rhit-jungh 92bc97c
Dynamic Select Test Complete
rhit-jungh 2d22096
Algorithm Test functional
rhit-jungh 6514ec5
System Algorithm Test Complete
rhit-jungh 81a00e1
edits
rhit-jungh 48f6072
edits
rhit-jungh aca8b44
Doc update
rhit-jungh 781fe84
edit
rhit-jungh 64b0897
Merge pull request #24 from rhventures/iOS_testing
rhit-jungh 2967818
Merge branch 'main' of https://github.com/rhventures/react-native-dro…
rhit-jungh 526a524
mutation killed after pull
rhit-jungh 5e97c21
mutant killed for Dynamic testing
rhit-jungh 6a69fe6
mutant killed for multi-select testing
rhit-jungh ceaf5b5
Mutant killed for single Select
rhit-jungh 2a8b7a0
Branched from #22
aurvyn 36162bc
update read me
rhit-jungh d527b33
Allow `disabled` to be passed in
aurvyn fe16638
Disable selector box if true
aurvyn 7f40d0f
Change appearance if disabled
aurvyn c328a24
docs fixed
rhit-jungh b04d2d5
fix documentation
rhit-jungh 867edb6
documentation update
rhit-jungh 954aa72
Doc Upate
rhit-jungh 1396735
documentation update
rhit-jungh 0b0deba
documentation update
rhit-jungh e9900b8
documtation update
rhit-jungh b807504
documentaion update
rhit-jungh d477952
fix read me
rhit-jungh f474fad
Fix Both Read Mes
rhit-jungh 73a85cd
doc update
rhit-jungh 489456b
Update from parent branch
aurvyn 37c7d46
update from parent branch
aurvyn fdba11f
Merge branch 'dysrakescence/disable-selectors' of https://github.com/…
rhit-jungh cafde82
no test broken after pull
rhit-jungh 817deac
Change file name
rhit-jungh 7d52b75
Double Render Bugfix (#14)
aurvyn 800a9e0
Code Refactor (#15)
aurvyn 5cf81ee
MultiSelect Clear Button (#17)
aurvyn 6724b89
MultiSelect Clear Button Styling (#18)
aurvyn d1aa6d1
Merge branch 'main' into GUI-Testing
rhit-jungh 6c33867
Update README.md
rhit-jungh 93d1e44
iOS Integration (#16)
aurvyn ec310a3
Merge branch 'main' into GUI-Testing
rhit-jungh 3386e0d
Update README.md
rhit-jungh d36ce10
Merge branch 'main' of https://github.com/rhventures/react-native-dro…
rhit-jungh 0edb8c0
change package json
rhit-jungh 1f9c8b2
Merge branch 'main' of https://github.com/rhventures/react-native-dro…
rhit-jungh a4b196b
fix package json and reinstall NPM
rhit-jungh 85a430e
fix breaking tests
rhit-jungh fc932cd
fix ios test build
rhit-jungh 0957e96
remove unnecessary comments
rhit-jungh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,229 @@ | ||
| # Using APPIUM and APPIUM Inspector for React Native GUI testing on iOS Applications | ||
|
|
||
| ## Why APPIUM? | ||
| Well... Selenium does not support mobile apps for test yet... Appium can not only be used for testing web apps, but it can also be used for testing iOS, Android or Watch OS such as Tizen. | ||
|
|
||
| If you would like to know more information about Appium Software, here is the URL: | ||
| https://appium.io/docs/en/latest/intro/ | ||
|
|
||
| ## *We are only testing on iOS Platform on Mac OS at this time* | ||
|
|
||
| ## General Prerequisites for using APPIUM | ||
|
|
||
| ### Programming Proficiency | ||
| - Acceptable Knowledge in Javascript, Java, or Python. | ||
|
|
||
| ### Install Node.JS | ||
| - https://nodejs.org/en | ||
|
|
||
| ## iOS Setup | ||
| 1. Install Xcode from the MacOS App Store. | ||
| 2. Install Xcode Command Line Tools: | ||
| ``` | ||
| xcode-select --install | ||
| ``` | ||
| - to make sure it is installed: | ||
| ``` | ||
| xcode-select -p | ||
| ``` | ||
|
|
||
| ### Install Appium Inspector | ||
| - [Download the compatable Appium Inspector here](https://github.com/appium/appium-inspector/releases) | ||
| - I used the mac.arm64.exe | ||
| - *When using a macbook, make sure to know if your mac supports x64 or arm 64!* | ||
|
|
||
| ### Install Appium | ||
| - [Appium](https://appium.io/docs/en/latest/quickstart/install/) | ||
| or run this command in your terminal: | ||
| ``` | ||
| npm install -g appium | ||
| ``` | ||
| Check your appium version using | ||
| ``` | ||
| appium -v | ||
| ``` | ||
| ### Execute Appium Doctor | ||
| For Appium to work, the necessary downloads must be checked. | ||
| run: | ||
| ``` | ||
| npm install appium-doctor -g | ||
| ``` | ||
| and then run: | ||
| ``` | ||
| appium-doctor | ||
| ``` | ||
| - If there is necessary fix that must be done, it must be done. For optional fixes, it can be ignored. | ||
|
|
||
| ### Install Appium Drivers | ||
| We will use a driver for the Appium to function properly. Run: | ||
| ``` | ||
| appium driver install xcuitest | ||
| ``` | ||
| You can check the installed drivers using: | ||
| ``` | ||
| appium driver list | ||
| ``` | ||
|
|
||
| ## Generating a debug app to test. | ||
| If you already have the app as an ipa file, then you can skip this step | ||
|
|
||
| ### Using React-Native | ||
| **If you do not have an ipa file of your app :** | ||
| - go to [React Native Set Up](https://reactnative.dev/docs/set-up-your-environment) and follow the instructions to integrate with the existing app you have through [Integration w/ Existing Apps](https://reactnative.dev/docs/integration-with-existing-apps) | ||
| - After you have successfully integrated your app with with React Native, you should have brew installed. Now go ahead and install the dependency Carthage | ||
| ``` | ||
| brew install carthage | ||
| ``` | ||
| - now proceed to the next step. | ||
|
|
||
|
|
||
| ### Generating the debug app | ||
| - Once you run the command at the proper directory: | ||
| ``` | ||
| npm run ios | ||
| ``` | ||
| - you will get something like: | ||
| ``` | ||
| Installing "/path/to/your/debug/app/example.app" | ||
| ``` | ||
| - This will be your app path. **REMEMBER THIS PATH!** | ||
|
|
||
| ## Setup the WebDriverIO | ||
| - Create a new folder named like "Test-<'CustomName'> under your root project directory | ||
| - My folder heirarchy looks like: | ||
| -  | ||
| - In my case, it would be the **Test-DropDown-Selector-iOS** | ||
| 2. Run the following command in the new folder you just created | ||
| ``` | ||
| npm init wdio | ||
| ``` | ||
| This will trigger the installation process. Now move on to the configurations | ||
| ### Configurations | ||
| - **Project name**: Assuming you are in the right folder...: Yes | ||
| - **E2E Testing** | ||
| - **Where**: On my local machine | ||
| - **Mobile** - native, hybrid and mobile web apps ... -> If its a web application, choose Web | ||
| - **iOS** : Mobile Environment | ||
| - **Framework**: I used Mocha, but feel free to use what you need | ||
| - No Compiler | ||
| - No autogenerate | ||
| - **Reporter**: **spec** | ||
| - **Plugins**: NONE. Just press Enter | ||
| - **Visual testing**: Default. Just Press Enter | ||
| - **Add a service**: Appium | ||
| - Run npm install | ||
| - Continue with Appium setup using appium-installer?: NO | ||
|
|
||
| ## Configure your wdio.config.js file | ||
| There should be a **wdio.conf.js** file generated in the testing folder you previously created | ||
|
|
||
| Now in create a folder named **test** in newly made testing folder. This is where all the test files will go. | ||
| Anything not mentioned here can be left as default | ||
|
|
||
| - **Port** : 4723 | ||
| - **Specs** : this is where your test files go. If your test file name is **HelloWorld.js**, then the snippet might look like: | ||
| ``` | ||
| specs : [ | ||
| './test/HelloWorld.js' | ||
| ] | ||
|
|
||
| ``` | ||
| - **Max Instances** : Read the description this can change based on test environment. | ||
| - **Capabilities**: *This can change based on your development settings.* | ||
| - **platformName**: iOS | ||
| - **BrowserName** : *Delete this line, we are not using a browser driver* | ||
| - **appium:deviceName**: The emulator name you are using. Check iOS Simulator | ||
| - **appium:platformVersion**: Check your iOS Simulator | ||
| - **appium:automationName**: = XCUItest | ||
| - **appium:app**: the path to the debug app you generated earlier. | ||
|
|
||
| My code snippet looks like: | ||
| ``` | ||
| capabilities: [{ | ||
| // capabilities for local Appium web tests on iOS | ||
| platformName: 'iOS', | ||
| 'appium:deviceName': 'iPhone 15 Pro', | ||
| 'appium:platformVersion': '17.5', | ||
| 'appium:automationName': 'XCUITest', | ||
| 'appium:app' : iosAppPath | ||
| }], | ||
| ``` | ||
| - **framework** : Since I choose Mocha, I have it as *Mocha*, However, make sure this matches the testing framework you choose | ||
| - **mochaOpts** : the timeout here sets the time limit on the test case. | ||
| - I set mine to : | ||
| ``` | ||
| mochaOpts: { | ||
| ui: 'bdd', | ||
| timeout: 60000 | ||
| }, | ||
| ``` | ||
| - Remaning can be left default | ||
|
|
||
| - Now install Appium in your testing folder, **not the "test" folder** | ||
| ``` | ||
| npm install --save-dev appium@next | ||
| ``` | ||
|
|
||
| ## Setting up your Appium Inspector | ||
| 1. Open your Appium Inspector you installed earlier. | ||
| 2. go to Appium Inspector Tab, configure your boxes: | ||
|
|
||
| - **Remote Host** : default. -> Mine is 127.0.0.1 | ||
| - **Remote Port** : Set it to some number besides 4723. Mine is 3000 | ||
| - **Remote Path** : default. -> Mine is / | ||
|
|
||
| 3. Now in the JSON Representation Tab, copy the **Capabilities** code snippet from *wdio.conf.js* file and paste it. | ||
| 4. *platformName* should also be in quotes.* Click save | ||
| 5. Your capacity builder should be filled. If it is not automatically filled, it must be manually filled. | ||
| 6. Now in the capacity builder, make sure all the middle boxes are showing *text* | ||
| 7. Save the capability set | ||
|
|
||
| - After everything, your set up should look similar to this: | ||
| -  | ||
| 8. Leave the Inspector open for the Next Step | ||
|
|
||
| ### Connect your Appium Inspector with your app | ||
| 1. Open up terminal. | ||
| 2. Run this snippet in your terminal, with the *<'Port Number'>* being your number from the **Remote Port** number from Appium Inspector Setup: | ||
| ``` | ||
| appium -p <Port Number> | ||
| ``` | ||
| 3. Now the server for appium inspector should be running | ||
| 4. **Make sure your simulator is up and running.** | ||
| 5. **Make sure the app is running on the simulator-> run this command at your ios directory** | ||
| ``` | ||
| npm run ios | ||
| ``` | ||
| 6. Now click **Start Session** in the bottom right corner. | ||
| 7. If it connects, congradulations! Move on to the next section. | ||
|
|
||
|
|
||
| # Using the APPIUM Inspector | ||
| **GO WATCH:** | ||
| - [Tutorial](https://www.youtube.com/watch?v=Q5Oy8axA8Qw&t=1225s) start from 17:40 | ||
| - There are much more ways to find elements and generate assertions through using appium inspector. Take a look at this [WebdriverIO Docs](https://webdriver.io/docs/api/browser) | ||
| - Now go and mess with test cases and see what is the most optimized method for your project. | ||
|
|
||
| ### To Run the Test files | ||
| - Run: | ||
| ``` | ||
| npx wdio | ||
| ``` | ||
| ### Important | ||
| - **The test cases for this project was built based on iPhone 15 Pro Frame.** To ensure all the test cases pass, make sure the simulator uses *iPhone 15 Pro.* | ||
|
|
||
| ### Error Handling* | ||
| - If you run into an error: *"No spec files to run"* | ||
| - You do not have your test files specified in specs at *wdio.conf.js* | ||
|
|
||
| - If you run into an error: *"Connection Refuse error"* | ||
| - That means the server port is occupied. Run this command to kill all the active ports: | ||
| ``` | ||
| pkill -9 -f appium | ||
| ``` | ||
| - if you run into an error: *"ts-node/esm/trasnpile-only 'resolve' did not call the next hook.."* | ||
| - Running the following command will fix it. | ||
| ``` | ||
| npm i -D typescript ts-node | ||
| ``` | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word 'compatable' is misspelled; it should be 'compatible'.