0
0
Testing Fundamentalstesting~15 mins

App store submission testing in Testing Fundamentals - Build an Automation Script

Choose your learning style9 modes available
Verify app submission process to app store
Preconditions (3)
Step 1: Navigate to the app submission page in the developer portal
Step 2: Upload the app build file
Step 3: Fill in required metadata fields: app name, description, category, keywords
Step 4: Upload app screenshots for different device sizes
Step 5: Set pricing and availability options
Step 6: Submit the app for review
✅ Expected Result: App submission is accepted and confirmation message is displayed with submission ID
Automation Requirements - Selenium with Python
Assertions Needed:
Verify the app submission page loads correctly
Verify the app build file upload is successful
Verify all required metadata fields are filled and accepted
Verify screenshots upload is successful
Verify pricing and availability options are set
Verify submission confirmation message and submission ID are displayed
Best Practices:
Use explicit waits to handle page loading and element visibility
Use Page Object Model to organize page interactions
Use clear and maintainable locators (id, name, or accessible attributes)
Handle file upload dialogs properly
Include meaningful assertions for each step
Automated Solution
Testing Fundamentals
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import unittest

class AppStoreSubmissionPage:
    def __init__(self, driver):
        self.driver = driver
        self.wait = WebDriverWait(driver, 10)

    def load(self):
        self.driver.get('https://developer.appstore.com/submission')
        self.wait.until(EC.visibility_of_element_located((By.ID, 'submission-form')))

    def upload_build(self, file_path):
        upload_input = self.wait.until(EC.presence_of_element_located((By.ID, 'build-upload')))
        upload_input.send_keys(file_path)

    def fill_metadata(self, name, description, category, keywords):
        self.driver.find_element(By.ID, 'app-name').clear()
        self.driver.find_element(By.ID, 'app-name').send_keys(name)
        self.driver.find_element(By.ID, 'app-description').clear()
        self.driver.find_element(By.ID, 'app-description').send_keys(description)
        self.driver.find_element(By.ID, 'app-category').send_keys(category)
        self.driver.find_element(By.ID, 'app-keywords').send_keys(keywords)

    def upload_screenshots(self, screenshot_paths):
        for idx, path in enumerate(screenshot_paths, start=1):
            screenshot_input = self.driver.find_element(By.ID, f'screenshot-upload-{idx}')
            screenshot_input.send_keys(path)

    def set_pricing_and_availability(self, pricing_option, availability_option):
        pricing_select = self.driver.find_element(By.ID, 'pricing')
        pricing_select.send_keys(pricing_option)
        availability_select = self.driver.find_element(By.ID, 'availability')
        availability_select.send_keys(availability_option)

    def submit(self):
        submit_button = self.driver.find_element(By.ID, 'submit-button')
        submit_button.click()

    def get_confirmation_message(self):
        message = self.wait.until(EC.visibility_of_element_located((By.ID, 'confirmation-message')))
        return message.text

    def get_submission_id(self):
        submission_id = self.wait.until(EC.visibility_of_element_located((By.ID, 'submission-id')))
        return submission_id.text

class TestAppStoreSubmission(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Chrome()
        self.page = AppStoreSubmissionPage(self.driver)

    def test_app_submission(self):
        self.page.load()
        self.assertTrue(self.driver.current_url.endswith('/submission'))

        self.page.upload_build('/path/to/app_build.ipa')

        self.page.fill_metadata(
            name='My Test App',
            description='This is a test app for automation.',
            category='Utilities',
            keywords='test,automation,app'
        )

        self.page.upload_screenshots([
            '/path/to/screenshot1.png',
            '/path/to/screenshot2.png'
        ])

        self.page.set_pricing_and_availability('Free', 'Worldwide')

        self.page.submit()

        confirmation = self.page.get_confirmation_message()
        submission_id = self.page.get_submission_id()

        self.assertIn('submission accepted', confirmation.lower())
        self.assertTrue(len(submission_id) > 0)

    def tearDown(self):
        self.driver.quit()

if __name__ == '__main__':
    unittest.main()

This script uses Selenium with Python to automate the app store submission process.

The AppStoreSubmissionPage class follows the Page Object Model pattern to keep page interactions organized and reusable.

Explicit waits ensure elements are present or visible before interacting, avoiding timing issues.

Each step from loading the page, uploading files, filling metadata, setting options, and submitting is automated with clear methods.

Assertions check that the page loaded correctly, the confirmation message appears, and a submission ID is shown, verifying success.

The test class TestAppStoreSubmission sets up the browser, runs the test, and cleans up properly.

Common Mistakes - 4 Pitfalls
Using hardcoded sleep delays instead of explicit waits
Using brittle XPath locators that break easily
Not verifying that file uploads succeeded before continuing
Mixing page interaction code directly in test methods
Bonus Challenge

Now add data-driven testing with 3 different app metadata sets to submit multiple apps automatically.

Show Hint