104 行
6.0 KiB
Python
104 行
6.0 KiB
Python
# -*- coding: utf-8 -*-
|
||
"""
|
||
通俗易懂、去AI味、去啰嗦、面向客户与访客专项测试 (Plain and Concise Copywriting Test)
|
||
严格遵循 TDD 模式:
|
||
1. 严禁使用典型 AI/大厂虚词黑话(如“闭环”、“工匠精神打磨”、“准备开启您的...”等);
|
||
2. 确保面向客户与访客,使用大白话、实在话(如防重复扣款、源码交付、内网部署数据不泄露、标注文档原文);
|
||
3. 确保各个独立页面文案短小精悍、不啰嗦、讲人话。
|
||
"""
|
||
import os
|
||
import unittest
|
||
|
||
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||
|
||
class TestPlainAndConciseCopywriting(unittest.TestCase):
|
||
|
||
def setUp(self):
|
||
self.files = {
|
||
'index': os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/index.html'),
|
||
'index_e': os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/index_e.html'),
|
||
'service_page': os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/service_page.html'),
|
||
'service_software': os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/service_software.html'),
|
||
'service_app': os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/service_app.html'),
|
||
'service_agent': os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/service_agent.html'),
|
||
'product_page': os.path.join(ROOT_DIR, 'addons/official/view/web/official_product/product_page.html'),
|
||
'cases_page': os.path.join(ROOT_DIR, 'addons/official/view/web/official_case_show/list.html'),
|
||
'cases_e': os.path.join(ROOT_DIR, 'addons/official/view/web/official_case_show/list_e.html'),
|
||
'about_page': os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/single.html'),
|
||
'about_e': os.path.join(ROOT_DIR, 'addons/official/view/web/official_home/single_e.html'),
|
||
'contact_page': os.path.join(ROOT_DIR, 'addons/official/view/web/official_online_message/list.html'),
|
||
'contact_e': os.path.join(ROOT_DIR, 'addons/official/view/web/official_online_message/list_e.html'),
|
||
'nav_pc': os.path.join(ROOT_DIR, 'addons/official/view/web/official_common/pc/nav.html'),
|
||
'footer_pc': os.path.join(ROOT_DIR, 'addons/official/view/web/official_common/pc/footer.html'),
|
||
}
|
||
|
||
self.contents = {}
|
||
for key, path in self.files.items():
|
||
if os.path.exists(path):
|
||
with open(path, 'r', encoding='utf-8') as f:
|
||
self.contents[key] = f.read()
|
||
else:
|
||
self.contents[key] = ''
|
||
|
||
self.all_text = "\n".join(self.contents.values())
|
||
|
||
def test_forbid_ai_jargon_and_cliches(self):
|
||
"""严格杜绝 AI/互联网黑话与套话口癖"""
|
||
forbidden_jargon = [
|
||
'闭环', # 典型大厂/AI黑话(如“业务闭环”、“闭环协同”、“交付闭环”)
|
||
'工匠精神打磨', # 空洞煽情修饰
|
||
'准备开启您的', # 典型 AI 祈使反问句
|
||
'矩阵赋能', # AI 常用生造词
|
||
'双向幂等校验', # 过于晦涩的技术术语,应通俗化为防重复扣款/防重复提交
|
||
'多路向量重排召回',# 技术晦涩,应通俗化说明知识库检索精准
|
||
'多路向量召回', # 算法黑话
|
||
'无感幂等同步', # 技术行话,应通俗化为自动同步防重复
|
||
'数字化落地样本', # 典型公关大词,客户需要的是业务系统而非“样本”
|
||
'确定性数字化样本',
|
||
'知识管线', # 算法黑话,应通俗化为企业知识库
|
||
'语料处理管线', # 算法行话,应通俗化为知识库处理脚本
|
||
'操作链路', # UX大厂黑话,应通俗化为操作步骤
|
||
'脱敏数据沙箱', # 过于晦涩,应通俗化为演示环境
|
||
'厘清业务痛点', # 居高临下大厂套话,应为调研实际业务流程
|
||
'全链路打通', # 大厂黑话,应为全面打通或全面贯通
|
||
'全链路压测', # 应为高并发压力测试
|
||
]
|
||
for jargon in forbidden_jargon:
|
||
self.assertNotIn(jargon, self.all_text, f"全站文案仍包含黑话或AI套话: '{jargon}'")
|
||
|
||
|
||
|
||
def test_customer_friendly_plain_language(self):
|
||
"""面向客户与访客的大白话表达:突出价值与保障"""
|
||
# 首页:通俗的防重复扣款与数据安全
|
||
self.assertIn('防重复扣款', self.contents['index'], "首页产品指标应使用客户一目了然的'防重复扣款'")
|
||
|
||
# 智能体页:通俗解释
|
||
self.assertTrue(
|
||
'拔掉外网网线' in self.contents['service_agent'] or '断网也能用' in self.contents['service_agent'],
|
||
"智能体页必须用通俗大白话解释内网安全"
|
||
)
|
||
self.assertIn('标注原文出处', self.contents['service_agent'], "智能体页必须讲清楚回答带有出处")
|
||
|
||
# 案例页:拒绝“样本”,使用“数字化系统”;使用“自动同步防重复”
|
||
self.assertIn('数字化系统', self.contents['cases_page'])
|
||
self.assertIn('自动同步防重复', self.contents['cases_page'])
|
||
self.assertNotIn('多路向量召回', self.contents['cases_page'])
|
||
|
||
# 联系我们表单:使用通俗的“业务需求”而非大厂“痛点”
|
||
self.assertNotIn('系统痛点', self.contents['contact_page'])
|
||
self.assertIn('业务需求', self.contents['contact_page'])
|
||
|
||
# 软件开发页:面向客户的直白 CTA
|
||
self.assertNotIn('准备开启您的企业级定制软件工程?', self.contents['service_software'])
|
||
|
||
# APP与小程序页:通俗表述
|
||
self.assertNotIn('私域闭环', self.contents['service_app'])
|
||
|
||
# 产品页:开箱即用与源码买断清晰明了
|
||
self.assertIn('成熟商业系统', self.contents['product_page'])
|
||
|
||
|
||
if __name__ == '__main__':
|
||
unittest.main()
|