主頁 > 移動端開發 > 在GitlabCI中運行基于硒的pytest

在GitlabCI中運行基于硒的pytest

2021-11-24 08:36:03 移動端開發

我正在嘗試設定一個專案,該專案應該在 Gitlab CI 上運行的管道內運行用 python 撰寫的基于 e2e selenium 的測驗。目標是使用 pytest-docker 以便在我們可以運行測驗之前使用 docker-compose 檔案啟動所需的應用程式(這只是為了證明我為什么使用 dind 服務和 docker/compose 影像)。但是,我在 Gitlab CI(本地運行良好)中運行一個簡單的測驗(打開http://www.python.org并檢查標題)時遇到了問題。

所以我試圖運行的測驗是這樣的:

import pytest
from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from webdriver_manager.firefox import GeckoDriverManager
from pytest_bdd import scenarios, given, when, then, parsers


scenarios('../features/example.feature')


@pytest.fixture
def browser():
    s = Service(GeckoDriverManager().install())
    options = webdriver.FirefoxOptions()
    options.log.level = "TRACE"
    options.add_argument('--no-sandbox')
    options.add_argument('--headless')
    options.add_argument('--disable-gpu')
    b = webdriver.Firefox(service=s, options=options)
    b.implicitly_wait(10)
    yield b
    b.quit()


@when('the home page is displayed')
def home_displayed(browser):
    browser.get('http://www.python.org')


@then(parsers.parse('the page displays the title "{phrase}"'))
def page_displays_title(browser, phrase):
    assert "Python" in browser.title

我的 gitlab-ci.yml 看起來像這樣:

acceptance-tests:
  stage: Acceptance Test
  image: docker/compose
  services:
    - docker:dind
  before_script:
    - echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/community' > /etc/apk/repositories
    - echo 'https://dl-cdn.alpinelinux.org/alpine/v3.14/main/' >> /etc/apk/repositories
    - apk update && apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make firefox-esr
    - /usr/bin/python3.9 -m pip install --upgrade pip
    - pip install --no-cache-dir pipenv
    - pipenv install
  script:
    - pipenv run pytest src/backend/svfx22/tests/e2e/step_defs

在 Gitlab CI 中運行此管道步驟會產生以下堆疊跟蹤:

$ pipenv run pytest src/backend/svfx22/tests/e2e/step_defs
============================= test session starts ==============================
platform linux -- Python 3.9.5, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
django: settings: svfx22.settings (from ini)
rootdir: /builds/msex20/svfx22/src/backend/svfx22, configfile: pytest.ini
plugins: bdd-4.1.0, cov-3.0.0, docker-0.10.3, django-4.4.0
collected 1 item
src/backend/svfx22/tests/e2e/step_defs/test_example.py F                 [100%]
=================================== FAILURES ===================================
___________________________ test_open_svf_home_page ____________________________
request = <FixtureRequest for <Function test_open_svf_home_page>>
    @pytest.mark.usefixtures(*function_args)
    def scenario_wrapper(request):
>       _execute_scenario(feature, scenario, request)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pytest_bdd/scenario.py:165: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pytest_bdd/scenario.py:136: in _execute_scenario
    _execute_step_function(request, scenario, step, step_func)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pytest_bdd/scenario.py:100: in _execute_step_function
    kwargs = {arg: request.getfixturevalue(arg) for arg in get_args(step_func)}
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pytest_bdd/scenario.py:100: in <dictcomp>
    kwargs = {arg: request.getfixturevalue(arg) for arg in get_args(step_func)}
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:581: in getfixturevalue
    fixturedef = self._get_active_fixturedef(argname)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:601: in _get_active_fixturedef
    self._compute_fixture_value(fixturedef)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:687: in _compute_fixture_value
    fixturedef.execute(request=subrequest)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:1072: in execute
    result = hook.pytest_fixture_setup(fixturedef=self, request=request)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pluggy/_hooks.py:265: in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/pluggy/_manager.py:80: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:1126: in pytest_fixture_setup
    result = call_fixture_func(fixturefunc, request, kwargs)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/_pytest/fixtures.py:925: in call_fixture_func
    fixture_result = next(generator)
src/backend/svfx22/tests/e2e/conftest.py:72: in browser
    b = webdriver.Firefox(service=s, options=options)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py:180: in __init__
    RemoteWebDriver.__init__(
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:266: in __init__
    self.start_session(capabilities, browser_profile)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:357: in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:418: in execute
    self.error_handler.check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7ffa69ad2f70>
response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"Process unexpectedly closed with status signal","stacktrace":""}}'}
    def check_response(self, response: Dict[str, Any]) -> None:
        """
        Checks that a JSON response from the WebDriver does not have an error.
    
        :Args:
         - response - The JSON response from the WebDriver server as a dictionary
           object.
    
        :Raises: If the response contains an error message.
        """
        status = response.get('status', None)
        if not status or status == ErrorCode.SUCCESS:
            return
        value = None
        message = response.get("message", "")
        screen: str = response.get("screen", "")
        stacktrace = None
        if isinstance(status, int):
            value_json = response.get('value', None)
            if value_json and isinstance(value_json, str):
                import json
                try:
                    value = json.loads(value_json)
                    if len(value.keys()) == 1:
                        value = value['value']
                    status = value.get('error', None)
                    if not status:
                        status = value.get("status", ErrorCode.UNKNOWN_ERROR)
                        message = value.get("value") or value.get("message")
                        if not isinstance(message, str):
                            value = message
                            message = message.get('message')
                    else:
                        message = value.get('message', None)
                except ValueError:
                    pass
    
        exception_class: Type[WebDriverException]
        if status in ErrorCode.NO_SUCH_ELEMENT:
            exception_class = NoSuchElementException
        elif status in ErrorCode.NO_SUCH_FRAME:
            exception_class = NoSuchFrameException
        elif status in ErrorCode.NO_SUCH_WINDOW:
            exception_class = NoSuchWindowException
        elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
            exception_class = StaleElementReferenceException
        elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
            exception_class = ElementNotVisibleException
        elif status in ErrorCode.INVALID_ELEMENT_STATE:
            exception_class = InvalidElementStateException
        elif status in ErrorCode.INVALID_SELECTOR \
                or status in ErrorCode.INVALID_XPATH_SELECTOR \
                or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
            exception_class = InvalidSelectorException
        elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
            exception_class = ElementNotSelectableException
        elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
            exception_class = ElementNotInteractableException
        elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
            exception_class = InvalidCookieDomainException
        elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
            exception_class = UnableToSetCookieException
        elif status in ErrorCode.TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.SCRIPT_TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.UNKNOWN_ERROR:
            exception_class = WebDriverException
        elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
            exception_class = UnexpectedAlertPresentException
        elif status in ErrorCode.NO_ALERT_OPEN:
            exception_class = NoAlertPresentException
        elif status in ErrorCode.IME_NOT_AVAILABLE:
            exception_class = ImeNotAvailableException
        elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
            exception_class = ImeActivationFailedException
        elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
            exception_class = MoveTargetOutOfBoundsException
        elif status in ErrorCode.JAVASCRIPT_ERROR:
            exception_class = JavascriptException
        elif status in ErrorCode.SESSION_NOT_CREATED:
            exception_class = SessionNotCreatedException
        elif status in ErrorCode.INVALID_ARGUMENT:
            exception_class = InvalidArgumentException
        elif status in ErrorCode.NO_SUCH_COOKIE:
            exception_class = NoSuchCookieException
        elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
            exception_class = ScreenshotException
        elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
            exception_class = ElementClickInterceptedException
        elif status in ErrorCode.INSECURE_CERTIFICATE:
            exception_class = InsecureCertificateException
        elif status in ErrorCode.INVALID_COORDINATES:
            exception_class = InvalidCoordinatesException
        elif status in ErrorCode.INVALID_SESSION_ID:
            exception_class = InvalidSessionIdException
        elif status in ErrorCode.UNKNOWN_METHOD:
            exception_class = UnknownMethodException
        else:
            exception_class = WebDriverException
        if not value:
            value = response['value']
        if isinstance(value, str):
            raise exception_class(value)
        if message == "" and 'message' in value:
            message = value['message']
    
        screen = None  # type: ignore[assignment]
        if 'screen' in value:
            screen = value['screen']
    
        stacktrace = None
        st_value = value.get('stackTrace') or value.get('stacktrace')
        if st_value:
            if isinstance(st_value, str):
                stacktrace = st_value.split('\n')
            else:
                stacktrace = []
                try:
                    for frame in st_value:
                        line = self._value_or_default(frame, 'lineNumber', '')
                        file = self._value_or_default(frame, 'fileName', '<anonymous>')
                        if line:
                            file = "%s:%s" % (file, line)
                        meth = self._value_or_default(frame, 'methodName', '<anonymous>')
                        if 'className' in frame:
                            meth = "%s.%s" % (frame['className'], meth)
                        msg = "    at %s (%s)"
                        msg = msg % (meth, file)
                        stacktrace.append(msg)
                except TypeError:
                    pass
        if exception_class == UnexpectedAlertPresentException:
            alert_text = None
            if 'data' in value:
                alert_text = value['data'].get('text')
            elif 'alert' in value:
                alert_text = value['alert'].get('text')
            raise exception_class(message, screen, stacktrace, alert_text)  # type: ignore[call-arg]  # mypy is not smart enough here
>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status signal
/root/.local/share/virtualenvs/backend-MMqkD7aq/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py:243: WebDriverException
----------------------------- Captured stderr call -----------------------------
====== WebDriver manager ======
Current firefox version is 78.15
Get LATEST geckodriver version for 78.15 firefox
There is no [linux64] geckodriver for browser  in cache
Getting latest mozilla release info for v0.30.0
Trying to download new driver from https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
Driver has been saved in cache [/root/.wdm/drivers/geckodriver/linux64/v0.30.0]
------------------------------ Captured log call -------------------------------
INFO     WDM:logger.py:26 
INFO     WDM:logger.py:26 ====== WebDriver manager ======
INFO     WDM:logger.py:26 Current firefox version is 78.15
INFO     WDM:logger.py:26 Get LATEST geckodriver version for 78.15 firefox
INFO     WDM:logger.py:26 There is no [linux64] geckodriver for browser  in cache
INFO     WDM:logger.py:26 Getting latest mozilla release info for v0.30.0
INFO     WDM:logger.py:26 Trying to download new driver from https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
INFO     WDM:logger.py:26 Driver has been saved in cache [/root/.wdm/drivers/geckodriver/linux64/v0.30.0]
=========================== short test summary info ============================
FAILED src/backend/svfx22/tests/e2e/step_defs/test_example.py::test_open_svf_home_page
============================== 1 failed in 4.74s ===============================
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

任何人都可以幫我解決這個問題嗎?我的 gitlab-ci.yml 檔案中是否缺少某些內容?我嘗試添加 selenium/standalone-firefox 服務,但結果相同。

uj5u.com熱心網友回復:

這是在 Docker 中運行 Firefox 的一個已知問題在 Firefox 84 中得到修復

對于 Firefox 84 之前的版本,您必須將 docker 容器的/dev/shm大小(默認為 64MB)增加到 Firefox 可用的大小,例如 1g 或更大。但是,據我所知,這不能使用 GitLab 的共享運行程式進行配置。因此,您需要為此自托管 GitLab 運行程式,或者為這些較舊的 Firefox 版本使用其他 CI/瀏覽器提供程式。

uj5u.com熱心網友回復:

事實證明,我的問題的答案是添加 selenium/standalone-firefox 服務。我只需要在測驗中正確配置我的瀏覽器/驅動程式。所以通過添加:

  services:
    - selenium/standalone-firefox

在我的 gitlab-ci.yml 和:

import pytest
from selenium import webdriver
from selenium.webdriver import Remote

@pytest.fixture
def browser(http_service):
    b = Remote(
        command_executor='http://selenium__standalone-firefox:4444/wd/hub',
        options=webdriver.FirefoxOptions()
    )
    b.implicitly_wait(10)
    yield b
    b.quit()

問題就解決了。

謝謝你的回答。

轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/364310.html

標籤:Python 硒网络驱动程序 pytest gitlab-ci

上一篇:升級到SeleniumGrid4.0.0后,Chrome節點未注冊到SeleniumHub

下一篇:從集成的Python的多處理中使用Pool.map時,程式運行越來越慢

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【從零開始擼一個App】Dagger2

    Dagger2是一個IOC框架,一般用于Android平臺,第一次接觸的朋友,一定會被搞得暈頭轉向。它延續了Java平臺Spring框架代碼碎片化,注解滿天飛的傳統。嘗試將各處代碼片段串聯起來,理清思緒,真不是件容易的事。更不用說還有各版本細微的差別。 與Spring不同的是,Spring是通過反射 ......

    uj5u.com 2020-09-10 06:57:59 more
  • Flutter Weekly Issue 66

    新聞 Flutter 季度調研結果分享 教程 Flutter+FaaS一體化任務編排的思考與設計 詳解Dart中如何通過注解生成代碼 GitHub 用對了嗎?Flutter 團隊分享如何管理大型開源專案 插件 flutter-bubble-tab-indicator A Flutter librar ......

    uj5u.com 2020-09-10 06:58:52 more
  • Proguard 常用規則

    介紹 Proguard 入口,如何查看輸出,如何使用 keep 設定入口以及使用實體,如何配置壓縮,混淆,校驗等規則。

    ......

    uj5u.com 2020-09-10 06:59:00 more
  • Android 開發技術周報 Issue#292

    新聞 Android即將獲得類AirDrop功能:可向附近設備快速分享檔案 谷歌為安卓檔案管理應用引入可安全隱藏資料的Safe Folder功能 Android TV新主界面將顯示電影、電視節目和應用推薦內容 泄露的Android檔案暗示了傳說中的谷歌Pixel 5a與折疊屏新機 谷歌發布Andro ......

    uj5u.com 2020-09-10 07:00:37 more
  • AutoFitTextureView Error inflating class

    報錯: Binary XML file line #0: Binary XML file line #0: Error inflating class xxx.AutoFitTextureView 解決: <com.example.testy2.AutoFitTextureView android: ......

    uj5u.com 2020-09-10 07:00:41 more
  • 根據Uri,Cursor沒有獲取到對應的屬性

    Android: 背景:呼叫攝像頭,拍攝視頻,指定保存的地址,但是回傳的Cursor檔案,只有名稱和大小的屬性,沒有其他諸如時長,連ID屬性都沒有 使用 cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DURATIO ......

    uj5u.com 2020-09-10 07:00:44 more
  • Android連載29-持久化技術

    一、持久化技術 我們平時所使用的APP產生的資料,在記憶體中都是瞬時的,會隨著斷電、關機等丟失資料,因此android系統采用了持久化技術,用于存盤這些“瞬時”資料 持久化技術包括:檔案存盤、SharedPreference存盤以及資料庫存盤,還有更復雜的SD卡記憶體儲。 二、檔案存盤 最基本存盤方式, ......

    uj5u.com 2020-09-10 07:00:47 more
  • Android Camera2Video整合到自己專案里

    背景: Android專案里呼叫攝像頭拍攝視頻,原本使用的 MediaStore.ACTION_VIDEO_CAPTURE, 后來因專案需要,改成了camera2 1.Camera2Video 官方demo有點問題,下載后,不能直接整合到專案 問題1.多次拍攝視頻崩潰 問題2.雙擊record按鈕, ......

    uj5u.com 2020-09-10 07:00:50 more
  • Android 開發技術周報 Issue#293

    新聞 谷歌為Android TV開發者提供多種新功能 Android 11將自動填表功能整合到鍵盤輸入建議中 谷歌宣布Android Auto即將支持更多的導航和數字停車應用 谷歌Pixel 5只有XL版本 搭載驍龍765G且將比Pixel 4更便宜 [圖]Wear OS將迎來重磅更新:應用啟動時間 ......

    uj5u.com 2020-09-10 07:01:38 more
  • 海豚星空掃碼投屏 Android 接收端 SDK 集成 六步驟

    掃碼投屏,開放網路,獨占設備,不需要額外下載軟體,微信掃碼,發現設備。支持標準DLNA協議,支持倍速播放。視頻,音頻,圖片投屏。好點意思。還支持自定義基于 DLNA 擴展的操作動作。好像要收費,沒體驗。 這里簡單記錄一下集成程序。 一 跟目錄的build.gradle添加私有mevan倉庫 mave ......

    uj5u.com 2020-09-10 07:01:43 more
最新发布
  • 歡迎頁輪播影片

    如圖,引導開始,球從上落下,同時淡入文字,然后文字開始輪播,最后一頁時停止,點擊進入首頁。 在來看看效果圖。 重力球先不講,主要歡迎輪播簡單實作 首先新建一個類 TextTranslationXGuideView,用于影片展示 文本是類似的,最后會有個圖片箭頭影片,布局很簡單,就是一個 TextVi ......

    uj5u.com 2023-04-20 08:40:31 more
  • 【FAQ】關于華為推送服務因營銷訊息頻次管控導致服務通訊類訊息

    一. 問題描述 使用華為推送服務下發IM訊息時,下發訊息請求成功且code碼為80000000,但是手機總是收不到訊息; 在華為推送自助分析(Beta)平臺查看發現,訊息發送觸發了頻控。 二. 問題原因及背景 2023年1月05日起,華為推送服務對咨詢營銷類訊息做了單個設備每日推送數量上限管理,具體 ......

    uj5u.com 2023-04-20 08:40:11 more
  • 歡迎頁輪播影片

    如圖,引導開始,球從上落下,同時淡入文字,然后文字開始輪播,最后一頁時停止,點擊進入首頁。 在來看看效果圖。 重力球先不講,主要歡迎輪播簡單實作 首先新建一個類 TextTranslationXGuideView,用于影片展示 文本是類似的,最后會有個圖片箭頭影片,布局很簡單,就是一個 TextVi ......

    uj5u.com 2023-04-20 08:39:36 more
  • 【FAQ】關于華為推送服務因營銷訊息頻次管控導致服務通訊類訊息

    一. 問題描述 使用華為推送服務下發IM訊息時,下發訊息請求成功且code碼為80000000,但是手機總是收不到訊息; 在華為推送自助分析(Beta)平臺查看發現,訊息發送觸發了頻控。 二. 問題原因及背景 2023年1月05日起,華為推送服務對咨詢營銷類訊息做了單個設備每日推送數量上限管理,具體 ......

    uj5u.com 2023-04-20 08:39:13 more
  • iOS從UI記憶體地址到讀取成員變數(oc/swift)

    開發除錯時,我們發現bug時常首先是從UI顯示發現例外,下一步才會去定位UI相關連的資料的。XCode有給我們提供一系列debug工具,但是很多人可能還沒有形成一套穩定的除錯流程,因此本文嘗試解決這個問題,順便提出一個暴論:UI顯示例外問題只需要兩個步驟就能完成定位作業的80%: 定位例外 UI 組 ......

    uj5u.com 2023-04-19 09:16:23 more
  • FIDE重磅更新!性能飛躍!體驗有禮!

    FIDE 開發者工具重構升級啦!實作500%性能提升,誠邀體驗! 一直以來不少開發者朋友在社區反饋,在使用 FIDE 工具的程序中,時常會遇到諸如加載不及時、代碼預覽/渲染性能不如意的情況,十分影響開發體驗。 作為技術團隊,我們深知一件趁手的開發工具對開發者的重要性,因此,在2023年開年,FinC ......

    uj5u.com 2023-04-19 09:16:15 more
  • 游戲內嵌社區服務開放,助力開發者提升玩家互動與留存

    華為 HMS Core 游戲內嵌社區服務提供快速訪問華為游戲中心論壇能力,支持玩家直接在游戲內瀏覽帖子和交流互動,助力開發者擴展內容生產和觸達的場景。 一、為什么要游戲內嵌社區? 二、游戲內嵌社區的典型使用場景 1、游戲內打開論壇 您可以在游戲內繪制論壇入口,為玩家提供沉浸式發帖、瀏覽、點贊、回帖、 ......

    uj5u.com 2023-04-19 09:15:46 more
  • iOS從UI記憶體地址到讀取成員變數(oc/swift)

    開發除錯時,我們發現bug時常首先是從UI顯示發現例外,下一步才會去定位UI相關連的資料的。XCode有給我們提供一系列debug工具,但是很多人可能還沒有形成一套穩定的除錯流程,因此本文嘗試解決這個問題,順便提出一個暴論:UI顯示例外問題只需要兩個步驟就能完成定位作業的80%: 定位例外 UI 組 ......

    uj5u.com 2023-04-19 09:14:53 more
  • FIDE重磅更新!性能飛躍!體驗有禮!

    FIDE 開發者工具重構升級啦!實作500%性能提升,誠邀體驗! 一直以來不少開發者朋友在社區反饋,在使用 FIDE 工具的程序中,時常會遇到諸如加載不及時、代碼預覽/渲染性能不如意的情況,十分影響開發體驗。 作為技術團隊,我們深知一件趁手的開發工具對開發者的重要性,因此,在2023年開年,FinC ......

    uj5u.com 2023-04-19 09:14:08 more
  • 游戲內嵌社區服務開放,助力開發者提升玩家互動與留存

    華為 HMS Core 游戲內嵌社區服務提供快速訪問華為游戲中心論壇能力,支持玩家直接在游戲內瀏覽帖子和交流互動,助力開發者擴展內容生產和觸達的場景。 一、為什么要游戲內嵌社區? 二、游戲內嵌社區的典型使用場景 1、游戲內打開論壇 您可以在游戲內繪制論壇入口,為玩家提供沉浸式發帖、瀏覽、點贊、回帖、 ......

    uj5u.com 2023-04-19 09:08:34 more