差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
rf:rf:upgrade:3.0to3.1.2 [2019/11/17 18:34]
tony [Escaping empty cells with '\' before line continuation marker '...' is deprecated. Remove escaping before Robot Framework 3.2.]
rf:rf:upgrade:3.0to3.1.2 [2023/06/25 09:48] (目前版本)
行 19: 行 19:
 應該是3.1版本的內容:​ [[https://​github.com/​robotframework/​robotframework/​blob/​master/​doc/​releasenotes/​rf-3.1b1.rst#​other-issues-possibly-causing-backwards-incompatibility-problems|link]]。 應該是3.1版本的內容:​ [[https://​github.com/​robotframework/​robotframework/​blob/​master/​doc/​releasenotes/​rf-3.1b1.rst#​other-issues-possibly-causing-backwards-incompatibility-problems|link]]。
 ===== Escaping empty cells with '​\'​ before line continuation marker '​...'​ is deprecated. Remove escaping before Robot Framework 3.2. ===== ===== Escaping empty cells with '​\'​ before line continuation marker '​...'​ is deprecated. Remove escaping before Robot Framework 3.2. =====
-目前作者認為...是奇怪的語法,打算在3.2中廢掉它,可以參考[[https://​github.com/​robotframework/​robotframework/​issues/​3148|issue 3148]];而我們最常會遇到的地方是在:​For中較長的內容會透過反斜線加...去銜接。\\+目前作者認為'...'是奇怪的語法,打算在3.2中廢掉它,可以參考[[https://​github.com/​robotframework/​robotframework/​issues/​3148|issue 3148]];而我們最常會遇到的地方是在:​For中較長的內容會透過反斜線加'...'去銜接。\\
 \\ \\
 另外在3.3要廢掉:​FOR語法,改用FOR+END去替代它,可以參考[[https://​github.com/​robotframework/​robotframework/​issues/​3078|issue 3078。\\ 另外在3.3要廢掉:​FOR語法,改用FOR+END去替代它,可以參考[[https://​github.com/​robotframework/​robotframework/​issues/​3078|issue 3078。\\
行 26: 行 26:
 \\ \\
 因此我決定,等之後再來研究這個問題。 因此我決定,等之後再來研究這個問題。
 +===== Error in file '​./​testdata/​data.txt':​ Unrecognized table header .. =====
 +升級後,Log產生海量的Error且使用新版RIDE也會出現大量的類似錯誤,雖然並不會造成測試不會動,但非常礙眼。這個問題是由於新版的RF在你沒有明確指定測試檔案時,它會去掃工作目錄下所有的txt檔案。針對這個問題,我使用過兩個做法:​
 +  - 指定測試檔案:​ 我嘗試過使用simple pattern的方式,如[0-9][0-9]_*.txt;但產生報表時,Test Suite名稱會是由所有檔案名稱串起來的,根本難以閱讀。
 +  - 把副檔名從txt改為robot:​ 這做法可以根治這問題,但比較麻煩。
 +我提供第二種做法細節給大家參考。之所以麻煩,是由於原本使用txt的方式,代表Resource參考方式也是;這意味著除了要修改檔案名稱外,還要修改測試內容。因此,可以參考以下步驟去解決這問題:​
 +  - 寫一隻程式,列出放測試案例目錄下所有的txt檔案路徑,並寫到檔案中。
 +  - Review這隻檔案,排除不需要轉換的項目。
 +  - 寫一隻程式,讀取各路徑的檔案內容;以行為處理單位,將Resource開頭的行中,.txt結尾字串取代為.robot。
 +  - 寫一隻程式,將各路徑的檔案rename,將附檔名從.txt改為.robot。
 +  - 最後就是在你的robot執行命令加上--extension robot,問題解決。
  
- +=====    ===== 
- +---- 
 +\\ 
 +~~DISQUS~~