├── .gitignore ├── .nojekyll ├── LICENSE ├── README.md ├── _coverpage.md ├── _navbar.md ├── _sidebar.md ├── experiences ├── 面试真题.md └── 面试经验.md ├── index.html ├── intro ├── cv.md ├── interviewer.md └── process.md ├── questions ├── common │ ├── HR面.md │ ├── 智力题.md │ ├── 自我表达.md │ └── 转场反问.md ├── dev │ ├── algorithms.md │ ├── db.md │ ├── db │ │ ├── SQL基础.md │ │ ├── SQL实战.md │ │ ├── mysql事务.md │ │ ├── mysql索引.md │ │ └── other.md │ ├── design.md │ ├── design │ │ ├── 并发与锁基础.md │ │ └── 设计模式.md │ ├── java.md │ ├── java │ │ ├── JavaJVM.md │ │ ├── Java基础.md │ │ ├── Java容器.md │ │ ├── Java并发.md │ │ ├── articles │ │ │ ├── 对象拷贝.md │ │ │ └── 异常.md │ │ ├── dubbo.md │ │ └── spring.md │ ├── network.md │ ├── os.md │ ├── os │ │ └── 计算机操作系统.md │ └── python.md ├── manage │ └── 管理.md ├── test │ ├── proxy.md │ ├── 前端测试.md │ ├── 服务端测试.md │ ├── 测试基础.md │ └── 移动端测试.md └── work │ ├── 工作总结.md │ ├── 职业观.md │ └── 项目经历.md ├── sw.js └── 阅前必读.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chankit8/qa-interview/ebecb33de1a54cbb50326b3221c073ab17972512/.nojekyll -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | !> [阅前必读](阅前必读.md) 3 | 4 | ## 🔰 入门 5 | 6 | - [简历制作](intro/cv.md) 7 | - [面试流程](intro/process.md) 8 | - [面试官](intro/interviewer.md) 9 | 10 | --- 11 | 12 | ## 📔 面试题 13 | 14 | ### 🐾 工作经验 15 | 16 | - [项目经历](questions/work/项目经历.md) 17 | - [工作总结](questions/work/工作总结.md) 18 | - [职业观](questions/work/职业观.md) 19 | 20 | ### 🐞 测试技术 21 | 22 | - [测试基础](questions/test/测试基础.md) 23 | - [前端测试](questions/test/前端测试.md) 24 | - [服务端测试](questions/test/服务端测试.md) 25 | - [移动端测试](questions/test/移动端测试.md) 26 | - [白盒测试]() 27 | - 安全测试 28 | - [代理与Mock](questions/test/proxy.md) 29 | - [代码覆盖率]() 30 | 31 | ### 💻 开发技术 32 | 33 | - [Java](questions/dev/java.md) 34 | - [Python](questions/dev/python.md) 35 | - [数据库](questions/dev/db.md) 36 | - [操作系统](questions/dev/os.md) 37 | - [网络](questions/dev/network.md) 38 | - [数据结构和算法](questions/dev/algorithms.md) 39 | - [系统架构与设计](questions/dev/design.md) 40 | 41 | 42 | ### 🏢 管理 43 | 44 | - [管理](questions/manage/管理.md) 45 | 46 | ### 👀 软能力 47 | 48 | - [自我表达](questions/common/自我表达.md) 49 | - [智力题](questions/common/智力题.md) 50 | - [转场反问](questions/common/转场反问.md) 51 | - [HR 面](questions/common/HR面.md) 52 | 53 | --- 54 | 55 | ## 👴 面经 56 | 57 | - [面试经验](experiences/面试经验.md) 58 | - [面试真题](experiences/面试真题.md) -------------------------------------------------------------------------------- /_coverpage.md: -------------------------------------------------------------------------------- 1 | 2 | # **QAdoc** 3 | 4 | > 软件测试工程师面试笔记 :100: 5 | 6 | * 简历、面试经验、面试知识点、面试题 7 | * **面试不是终点,学习没有起点** 8 | * 投稿:qadoc_org@163.com 9 | 10 | [开始阅读](README.md) 11 | 12 | -------------------------------------------------------------------------------- /_navbar.md: -------------------------------------------------------------------------------- 1 | 2 | * [QAdoc](https://qadoc.org) 3 | * 刷题 4 | * [leetcode](https://leetcode-cn.com) 5 | * [牛客网](https://www.nowcoder.com) 6 | * [JavaGuide](https://snailclimb.gitee.io/javaguide/#/) 7 | * [CS-Notes](https://cyc2018.github.io/CS-Notes) -------------------------------------------------------------------------------- /_sidebar.md: -------------------------------------------------------------------------------- 1 | 2 | - 入门 3 | - [简历制作](intro/cv.md) 4 | - [面试流程](intro/process.md) 5 | - 面试题 6 | - [通用面试题](q/common/common.md) 7 | - 软件测试 8 | - [测试基础](q/test/base.md) 9 | - [代理与Mock](q/test/proxy.md) 10 | - [APP 测试](q/test/app.md) 11 | - [UI 自动化](q/test/autoui.md) 12 | - [接口&接口自动化](q/test/autoapi.md) 13 | - [测试管理](q/manage/test.md) 14 | - 软件开发 15 | - [数据库](q/dev/db.md) 16 | - [网络:HTTP](q/dev/http.md) 17 | - [编程语言:Java](q/dev/java.md) 18 | - [编程能力](q/dev/program.md) 19 | - [系统架构](q/dev/architecture.md) 20 | - 软件运维 21 | - [Linux](q/ops/linux.md) 22 | - 面经 23 | - [未分类](exp/inbox.md) 24 | - [阿里巴巴](exp/alibaba.md) -------------------------------------------------------------------------------- /experiences/面试真题.md: -------------------------------------------------------------------------------- 1 | 2 | # 面试真题 3 | 4 | ## 2020 5 | 6 | - [@测试开发 从手工到测开,一位测试媛宝妈的 BAT 大厂逆袭之旅](https://mp.weixin.qq.com/s/VScv0_q5EV0ihMfi1TBHqw) 7 | - [@测试开发 从屡次碰壁到成长蜕变,半年拿下某大厂 60W 年薪测试开发 Offer!](https://mp.weixin.qq.com/s/S-VEoLv7QX0ho7DEApDunA) 8 | 9 | ## 2019 10 | 11 | - [@测试开发 测试老兵进阶突破,成功挑战大厂 P7 Offer!](https://mp.weixin.qq.com/s/iqoBHJ7lt-qYg7erHmA_LA) 12 | - [@测试开发 阿里社招测试开发面经](https://www.nowcoder.com/discuss/343975) 13 | - [@测试开发 百度测试开发岗位面试题目回顾](https://mp.weixin.qq.com/s/Yr4K8WMzeEFPNjkVR7oV4w) 14 | 15 | 16 | -------------------------------------------------------------------------------- /experiences/面试经验.md: -------------------------------------------------------------------------------- 1 | 2 | # 面试经验 3 | 4 | ## 2019 5 | 6 | - [我在阿里做技术面试官的一些经验](https://www.jianshu.com/p/9cef4141cfb2) 7 | 8 | ## 2018 9 | 10 | - [如何在阿里技术面试中脱颖而出?(内部资料)](https://blog.csdn.net/b0Q8cpra539haFS7/article/details/79784958) 11 | 12 | ## 2016 13 | 14 | - [面试感悟----一名3年工作经验的程序员应该具备的技能](https://www.cnblogs.com/xrq730/p/5260294.html) -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | QAdoc 6 | 7 | 8 | 9 | 10 | 19 | 20 | 21 |
努力加载中,客官请稍等...
22 | 60 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /intro/cv.md: -------------------------------------------------------------------------------- 1 | 2 | # 简历制作 3 | 4 | > 简历中的任何信息都建议保证真实可信,特别是教育经历和工作经历,这些是比较容易做背景调查的。 5 | 6 | 简历的制作一般遵循以下几个步骤: 7 | 8 | 1. 确定求职目标,准备简历素材。 9 | 2. 确定简历结构,整理简历素材。 10 | 3. 组织语言,编写初稿。 11 | 4. 优化简历,突出重点。 12 | 5. 制作成品,如:Word。 13 | 14 | ## 简历素材 15 | 16 | - 简历素材:可以先凭记忆写个大概,再根据平时的工作文档(如周报、年报、绩效考核等文件)和工作笔记补充细节。 17 | - 整理素材:将简历素材按简历结构进行分类。 18 | 19 | ## 简历结构 20 | 21 | 测试简历中主要表达**学历、能力、经历**三方面的内容,因此一份合格的测试简历,应当包含以下 5 个模块: 22 | 23 | - 基本信息 24 | - 个人能力 25 | - 教育背景 26 | - 工作经历 27 | - 项目经验 28 | 29 | ### 基本信息 30 | 31 | 1. 简历名称:建议格式为 “姓名_应聘岗位_工作年限” 32 | 2. 个人基本信息:姓名、性别、出生年月或年龄、民族、学历、联系方式(手机、邮箱)、个人博客或个人网站或GitHub地址 33 | 34 | > 如果是跨城市投递简历,建议在基本信息中加上现居住地。 35 | > 关于个人图像,如果颜值可以,可以贴上。 36 | 37 | ### 个人能力 38 | 39 | 个人能力是简历筛选和面试中的主要考察点之一,个人能力和岗位匹配度越高,简历和面试通过的可能性越大。在 IT 行业,一般用精通、熟悉、了解来描述一个人对一个技能的掌握程度。 40 | 41 | - 精通:对该技能的原理或源码有深入了解,掌握所有高阶知识点,能解决该技能领域90%以上的问题。(已达到或接近专家水平) 42 | - 熟悉:知道该技能的原理,掌握所有常用知识点,经常使用该技能,能独立使用该技能完成任务。(熟练工) 43 | - 了解:用过该技能,能在借助文档、他人指导的前提下,独立使用该技能完成任务。(学徒) 44 | 45 | 个人能力注意事项: 46 | 47 | - 个人能力要展示亮点(自己擅长的、重大贡献等),体现自己的价值。 48 | - 不要堆砌过多入门技能或了解的(特别是工作三年以上的测试工程师)。 49 | - 项目经验要能辅证个人能力。 50 | - 只知道名字,不了解、没怎么用过的不要写在简历上,否则问的时候一问三不知。 51 | 52 | 本模块内容按照类型可以进行如下分类。 53 | 54 | - 【测试经验】软件测试、自动化或性能测试、测试管理、专项测试等的工作年限。 55 | - 【测试基础】测试流程、测试理论、用例设计、缺陷管理等等。独有的测试技巧或方法。 56 | - 【测试管理】带团队的规模、项目规模、系统复杂度,测试计划、项目进度把控、过程改进,人才管理等。 57 | - 【测试环境】Linux、测试环境搭建维护等。 58 | - 【编程能力】Java、Python、Shell、JavaScript等编程语言,数据结构、算法、设计模式,也可以写Spring、Dubbo等框架。对软件技术架构,如微服务、分布式、高可用、缓存、事务、数据库切分、数据库事务等的了解程度。 59 | - 【数据库】SQL知识,MySQL、Oracle、PostgreSQL、SQL Server、Redis、MongoDB等。 60 | - 【UI 自动化】Selenium、Appium等自动化工具,实战经验,开源框架或方案,取得的成果等等。 61 | - 【接口自动化】Postman、Jmeter、RestAssured、HttpClient、SoapUI等自动化工具,实战经验,开源框架或方案,取得的成果等等。 62 | - 【性能测试】LoadRunner、Jmeter、Locust等性能测试工具,实战经验,开源框架或方案,取得的成果等等。 63 | - 【测试开发】测试工具、测试平台、精准测试、持续集成、DevOps、TestOps等等。 64 | - 【安全测试】AppScan等安全工具,实战经验,取得的成果等等。 65 | - 【测试工具】其他测试工具,如Fiddler、Docker、Jenkins、TestNG、Junit、Maven、Git等等。 66 | - 【其他】如英语水平(CET4、CET6等)、敏捷测试经验等等。 67 | - 【个人作品】体现个人能力的作品。 68 | 69 | 70 | ### 教育背景 71 | 72 | 很多时候,学历和工作年限是筛选简历的第一步,所以学历算是面试的一个门槛。 73 | 74 | - 教育背景从大专或大学开始写,直至你的最高学历,如硕士、博士。按时间倒序排列。 75 | - 如果在读(专升本、读研期间等),注明预计取得学历的时间。 76 | - 高中及以下的教育经历、培训经历不用写。 77 | - 一般的公司会要求大专及以上,大厂通常要求统招本科及以上。 78 | 79 | **建议格式:** 80 | 81 | 2015.09 - 至今 XX科技大学 软件工程专业(预计2018.06毕业) 82 | 2011.09 - 2015.06 XX科技大学 数学与应用数学专业 83 | 84 | ### 工作经历 85 | 86 | 工作经历建议如实按时间倒序编写。如果是转行做测试的,非测试工作经历可以选择不写。 87 | 88 | **建议格式:** 89 | 90 | 2012.06 - 2015.07 B公司 测试工程师(2年)/部门主管(1年) 91 | 2010.03 - 2012.05 A公司 测试工程师 92 | 93 | ### 项目经验 94 | 95 | 尽量编写时长在三个月以上的项目经验,三个月以内完成的项目建议省略。项目经验模块分为 4 个部分: 96 | 97 | - 【项目基本信息】项目名称、项目周期、面试者在该项目中的职位或角色 98 | - 【项目简介】即项目的概述:项目类型、技术栈类型、项目的功能模块组成、项目的服务对象或用途等。项目简介推荐使用一两句话(100 字左右)概括完毕。 99 | - 【工作内容/个人职责】任务+行动。本项目中,自己主要工作内容,建议使用有序列表条理清晰且细化地表达出来。同时要和前面的个人能力模块相匹配,即能有力地佐证关于技能熟练度的描述。 100 | - 【工作业绩/主要成果】成果量化:如线上缺陷遗漏率为 1%、测试用例数、发现Bug数等。突出贡献:如得到公司金Bug奖、完成了自动化体系建设、开发了 XX 测试工具/平台、开源了 XX 框架、团队建设、创新性发明、对公司或部门的其他突出贡献等。 101 | 102 | ## 优化简历 103 | 104 | 简历文稿写好后,我们可以进行一些通用的优化,还可以针对应聘的岗位做些特定的优化。 105 | 106 | **通用优化** 107 | 108 | - 个人能力中将突出的能力放在前面。 109 | - 项目经验的工作内容部分不要超过 8 条,项目列表不要超过 5 个。超出的部分,可以选择将不重要的内容压缩到一条中,删除工作内容几乎相同且无突出贡献的项目经历,删除很早之前的项目经验。 110 | 111 | **特定优化** 112 | 113 | - 删除简历中和本次应聘岗位无关的内容。 114 | 115 | ## 制作成品 116 | 117 | 在处理好简历文稿后,我们需要将简历内容以合适的布局结构和样式展现出来,一般我们选择使用 Word 来制作简历。 118 | 119 | ### Word 制作简历的技巧 120 | 121 | 如果我们去看网上的简历,会发现有些元素的出现频率很高。这里我们简要说明下简历中常见的元素及其使用方法。 122 | 123 | **字体** 124 | 125 | 字体建议设置为“微软雅黑”。 126 | 127 | 调整行间距: 128 | - 调整段落文字行间距:选中文字 - 右击选择段落 - 取消“如果定义了文档网络,则对齐到网络”。 129 | - 调整表格文字行间距:选中表格 - 依次按 Alt、O、P - 取消“如果定义了文档网络,则对齐到网络”。 130 | 131 | **横线** 132 | 133 | - 方法一:在 Word 文档的空白处输入 3 个横杠 `---` ,然后按回车。 134 | - 方法二:`插入 - 形状 - 线条 - 直线`。 135 | - 方法三:段落边框。输入文字并选中 - `设计 - 页面边框` - 边框 - 选择无,预览中选择下边框线(默认应用于段落) - 确定 136 | - 方法四:插入表格 - 选中表格右击,选择表格属性 - 边框和底纹 - 边框 - 选择“无”,预览中选择下边框线(默认应用于表格) - 确定 137 | 138 | **图片** 139 | 140 | 添加方法:`插入 - 图片`。图片建议选择“浮于文字上方”。 141 | 如果想将图片、文本框、线条等元素作为模板或一个整体,可以按住 Ctrl 依次选中,右击组合。 142 | 143 | **段落** 144 | 145 | > 使用段落的首行缩进,不要使用空格来缩进。 146 | 147 | - 首行缩进:选中段落,右击选择 `段落` 菜单项,`缩进和间距` 选项卡,找到 `缩进 - 特殊`,选择首行,缩进值为 2 字符。 148 | - 整体缩进:光标置于段落开始位置,拖动标尺左边下方的滑块进行左缩进(段落整体向右移)。 149 | 150 | **表格** 151 | 152 | 表格是简历中最常用的元素,通过表格和段落可以绘制出我们想要的任何布局。 153 | 154 | 插入表格方法:`插入 - 表格`。 155 | 156 | 调整表格布局: 157 | (1)右击合并、拆分单元格。 158 | (2)拖动表格竖线:将光标放在单元格的竖线上,等变成左右箭头时左右拖动。不选中单元格,调整整列的竖线,选中单元格调整该单元格竖线,下面演示的是调整单元格的竖线。 159 | 160 | ![](https://img.qadoc.org/interview/cv/drag_table_vertical_line.gif) 161 | 162 | 163 | 调整表格样式: 164 | (1)调整边框和底纹:选中表格或单元格,右击表格属性调整。 165 | (2)擦除表格框线:选中表格,点击 `布局 - 橡皮檫` 在指定单元格边线上单击擦除边线,按 `Esc` 退出橡皮檫。 166 | 167 | 168 | 169 | > 按 F4 可以重复上一步操作。 170 | 171 | 172 | **控件** 173 | 174 | 重复分区内容控件可以用来制作一个模板,比如简历各个模块的模板或项目经验的模板。 175 | 176 | 添加该控件到工具栏:文件 - 选项,如下图添加该按钮。关于该控件的使用示例请自行百度。 177 | 178 | ![重复分区内容控件](https://img.qadoc.org/interview/cv/repeating_section_content_control.jpg) 179 | 180 | **其他技巧** 181 | 182 | - 利用 `开始 - 格式刷`,可以快速的复制应用段落或文本的格式。 183 | - 使用制表位进行留白或对齐。`视图 - 标尺`,勾选标尺。光标置于留白处,单击标尺的某个刻度确定制表位,按 `Tab` 键留出空白。 184 | 185 | ![](https://img.qadoc.org/interview/cv/view_ruler.gif) 186 | -------------------------------------------------------------------------------- /intro/interviewer.md: -------------------------------------------------------------------------------- 1 | 2 | # 面试官 3 | 4 | ## 面试官不应该问什么? 5 | 6 | 1. **知识描述性问题:** 什么叫线程、什么是黑盒测试、某个 API 怎么调用、某个命令怎么用,这些问题百度就可得到答案,属于纯记忆性的知识。 7 | 1. **特别复杂的问题:** 如一个特别复杂的算法、一个很抽象的大问题,短时间内很难给予完整的回答。 8 | 1. **假设性的问题:** 假设你参与了这个项目,你觉得哪几个地方需要优化。假设性问题缺乏上下文,让人无从下手。 9 | 10 | ## 面试官应该问什么? 11 | 12 | 1. 已经发生的事情 13 | 1. 问题解决思路 14 | 1. 对工作的思考、总结 15 | 16 | ## 面试官该注意些什么? 17 | 18 | **不要在面试中试图证明别人不如自己** 19 | 20 | 人无完人,总有覆盖不到的地方,按照这个规则招聘,会错过很多优秀的人才。 21 | 22 | 23 | 24 | ## 参考资料 25 | 26 | 1. [如何在阿里技术面试中脱颖而出?(内部资料)](https://blog.csdn.net/b0Q8cpra539haFS7/article/details/79784958) -------------------------------------------------------------------------------- /intro/process.md: -------------------------------------------------------------------------------- 1 | 2 | # 面试流程 3 | 4 | ## 面试前 5 | 6 | 1. [制作简历](intro/cv.md) 7 | 2. 筛选意向公司,针对性复习 8 | 3. 投递简历 9 | 10 | > 1. 上策:在岗期间,依次去面试中意的公司。 11 | > 2. 中策:在岗期间,同时面试多家公司(一周不要超过两家)。 12 | > 3. 下策:裸辞后去面试。 13 | 14 | !> 不要懈怠任何一次面试,不要裸面,有备而来。 15 | 16 | ## 面试中 17 | 18 | 面试分为技术面和 HR 面。不同的公司,技术面的面试轮数不同,小公司一般技术面和 HR 面在一次现场面试中完成,大公司的技术面会有多轮。 19 | 20 | 通常情况下,技术面的第一轮是资深同事面,第二轮是未来主管面,后面几轮交叉面(其他部门主管等)或总监面,高级别岗位有总监或CTO面。HR 面是在技术面结束后。 21 | 22 | 注意事项: 23 | 24 | - 做过的项目一定要熟、了解原理,大多时候面试都是按项目问,用过的技术都会问,直到问到不会为止。 25 | - 面试过程中要留意场上情况,随机应变。 26 | - 回答问题时,注意掌握好时间。 27 | 28 | !> 面试中被问到不会的技术很正常,不要惊慌,要善于去引导面试官问自己擅长的领域。 29 | 30 | ## 面试后 31 | 32 | **HR 通知面试结果** 33 | 34 | HR 会邮件、电话或微信通知你面试结果,如果面试通过 HR 会和你沟通入职相关事项(入职时间、薪资等)并发 Offer。 35 | 36 | **如何拒绝 offer?** 37 | 38 | 先表示感谢,陈述下理由,再表示下遗憾,最后祝福下对方。 39 | 40 | > **示例1:** 感谢贵公司对我的认可,在面试中学习到很多新的知识,但因***(个人原因、另有发展),不能如期报到,愿贵公司早日找到合适的人选,祝贵公司前程似锦。 41 | 42 | **如何选择 offer?** 43 | 44 | - 尽量选择职业发展更好的 offer。 45 | - 选择 offer 的考虑因素:薪资、离家距离、职业发展、公司影响力、工作氛围等。 46 | 47 | !> 善于总结,把每次面试的问题都回来做个总结,会的和不会的,觉得自己没有答好的,技术问题或者人事问题,都可以做个积累。 -------------------------------------------------------------------------------- /questions/common/HR面.md: -------------------------------------------------------------------------------- 1 | 2 | # HR 面 3 | 4 | ## 你什么时候可以到岗? 5 | 6 | 7 | ## 你目前薪资多少?期望薪资多少? 8 | 9 | 期望报价:跳槽不频繁的情况,自己的底线加30%,面的好可以加50%。 10 | 11 | ## 你的期望薪资有点高,XX 你接受吗? 12 | 13 | HR 说这话,基本是录用你了。可以根据自己的以往工资和其他 offer 的工资合理进行谈判。 14 | 15 | ## 对加班怎么看? 16 | 17 | 等价问法: 18 | 19 | - 996 能接受吗? 20 | - 加班能接受吗? 21 | 22 | ## 你目前手里有多少 offer? 23 | 24 | 这个如实回答就好,但不要说条件好很多的 offer,否则 HR 会觉得你大概率不会选择自家。 25 | 26 | - 有:手里有几个条件相当的 offer。 27 | - 没有:还没有offer,有几家正在面试中,还没回复。 28 | 29 | ## 如果这次没有面试通过,你觉得会是什么原因? 30 | 31 | 32 | ## 今年公司的岗位晋升,你觉得哪方面可以让你通过这次考核? 33 | 34 | 35 | ## 对我们公司了解吗?应聘岗位了解吗? -------------------------------------------------------------------------------- /questions/common/智力题.md: -------------------------------------------------------------------------------- 1 | 2 | # 智力题 3 | 4 | ## 分出两杯 40ml 的水 5 | 6 | *题目:一个 80ml 的水杯装满水,一个 50ml 和一个 30ml 的空杯,怎么分出两个 40ml 的水。* 7 | 8 | 思路:80 杯倒满 50 杯,50 杯倒满 30 杯,剩 20ml,重复一次,得到 40ml。 9 | 10 | 具体步骤(数值代表水量,单位ml): 11 | 12 | | 80杯 | 50杯 | 30杯 | 13 | |:-:|:-:|:-:| 14 | | 80 | 0 | 0 | 15 | | 30 | 50 | 0 | 16 | | 30 | 20 | 30 | 17 | | 60 | 20 | 0 | 18 | | 60 | 0 | 20 | 19 | | 10 | 50 | 20 | 20 | | 10 | 40 | 30 | 21 | | 40 | 40 | 0 | 22 | 23 | 24 | ## 通过三次天平称重,找到不一样的球 25 | 26 | *题目:有外表相同的 8 个球,其中一个与其他七个重量不同,而且不知道这个球是比其他球轻还是重。请通过三次天平称重,找到那个不一样的球。* 27 | 28 | 给 8 个球分别编号为 1 到 8,记目标球为 X,X 所在的组为目标组,非 X 所在组为对照组。 29 | 30 | 1. 将八个球分成两组,A 组:1/2/3/4,B组:5/6/7/8。将 A 组再分成两组,A1:1/2,A2:3/4,对 A1 和 A2 称重,如果平衡,则 X 在 B组,否则在 A 组。现在目标组球数等于 4。 31 | 2. 从目标组取出两个球,从对照组取出两个球,进行称重。如果一样重,则 X 在目标组剩余的两个球里,否则 X 在刚才取出的两个球里。现在目标组球数等于 2。 32 | 3. 从目标组中取出一个球,从对照组取出一个球,进行称重。如果平衡,则 X 为目标组未取出的那个,否则是目标组刚取出的这个。 33 | 34 | ## 怎样烧这种绳子能计时1个小时15分钟 35 | 36 | *题目:一根不均匀的绳子,全部烧完需要1个小时,问怎样烧这种绳子能计时1个小时15分钟?* 37 | 38 | 解决问题的关键在于如何计时 15 分钟。 39 | 40 | 注意到这样一个事实,如果同时点燃不均匀绳子的两端,那么所需要的时间为从一端点燃所需时间的一半。推导过程见附录A。 41 | 42 | 1. 因此要计时 15 分钟,就要从绳子两端同时点燃,但一根完整的绳子即使同时点燃,也只能计时 30 分钟。 43 | 2. 为了计时 15 分钟,我们需要一根全部烧完需要 30 分钟的绳子。如果让一根绳子分两次烧,先烧 30 分钟,则绳子的剩余一半烧完刚好也是 30 分钟。 44 | 3. 根据第 1 点,我们可以计时 30 分钟。 45 | 46 | 至此,所有条件都满足了,我们再反推回去。 47 | 48 | 1. 拿出绳子 A 和 绳子 B,同时点燃 A 的两端和 B 的一端,A 用来计时 30 分钟,B 为了得到烧完需要 30 分钟的绳子。 49 | 2. 当绳子 A 烧完,点燃 B 的另一端,计时 15 分钟。 50 | 3. 拿出绳子 C,当绳子 B 烧完,同时点燃 C 的两端,计时 30 分钟。 51 | 52 | 53 | **附录A:同时点燃两端所需时间的推导过程** 54 | 55 | 已知事实: 56 | 57 | 假设不均匀绳子的左端为 a,右端为 b,则从 a 到 b 所需要的时间为 60 分钟,记为 a → b = 60。 58 | 59 | 推导: 60 | 61 | 1. 一定存在这样的一点 c,位于 a 与 b 之间使得 a → c = 60/2 = 30 且 c → b = 60/2 = 30。 62 | 2. 因为 c → b 和 b → c 是完全对等的,所以 b → c = 30。 63 | 3. 从 1 和 2 得知,a → c = 30,b → c = 30,又因为 ac + bc = ab,所以如果同时点燃绳子的两端 a 和 b,半小时后刚好烧完整根绳子(同时到达位置 c)。即同时点燃绳子的两端 a 和 b,整根绳子烧完需要的时间为点燃绳子一端所需时间的一半。 64 | 4. 将 3 推广到任意长度的不均匀绳子,则同时点燃两端烧完所需时间为从一端点燃所需时间的一半。 -------------------------------------------------------------------------------- /questions/common/自我表达.md: -------------------------------------------------------------------------------- 1 | 2 | # 自我表达 3 | 4 | ## 请做下自我介绍 5 | 6 | 完整的自我介绍包括姓名、年纪、学历背景、工作经历、特长或优势、工作职责与业绩(整体凝练即可,不必展开说)、管理范围、为什么来面试等。 7 | 8 | **结束时,有个结束语**,比如“谢谢”,把提问权还给对方。 9 | 10 | 考察点: 11 | 12 | - 初步了解面试者,并对面试者做初步判断 13 | - 语言组织和表达能力,条理性、逻辑性 14 | 15 | 应当做到: 16 | 17 | - 时间控制在 1 - 2 分钟。 18 | - **重点放前面阐述,自己的亮点要在自我介绍中说出来**(人的注意力一开始会比较集中,也以免被打断来不及说),详略分配得当,过程中注意眼神交流,坐姿/站姿。 19 | - 全神贯注,坚定自信,语速切忌过快或过慢。 20 | 21 | 应当避免: 22 | 23 | - 长篇大论,“背诵式”。 24 | - 不顾面试官反应,一味按照提前准备好的去说。 25 | - “忘词”或者各种情况导致的紧张。 26 | 27 | ## 说说你的优缺点 28 | 29 | 面试前至少准备 3-5 个优点、真实但无碍面试的缺点,另外为每个优缺点找到真实的事例。 30 | 31 | 提示: 32 | 33 | - 优点 34 | - 学习类 35 | - 非常喜欢学习 36 | - 经常思考总结,习惯记笔记 37 | - 喜欢探寻事情的本质 38 | - 工作类 39 | - 生活类 40 | - 性格很好、脾气好 41 | - 真诚谦虚 42 | - 缺点 43 | - 做事比较细心,所以有时会显得没效率 44 | - 强迫症、追求完美 45 | - 性格内向、不喜欢交际 46 | 47 | 应当避免: 48 | 49 | - 不要说自己非常严重的毛病(如我做事很不细心),否则 offer 容易没戏。 50 | - 不要强行把优点说成缺点,也不要说自己没缺点。 51 | 52 | ## 请做下自我评价 53 | 54 | 55 | 参考资料: 56 | 57 | 1. [怎么写简历中的自我评价?](https://www.zhihu.com/question/20632491) 58 | 59 | ## 别人是如何评价你的 -------------------------------------------------------------------------------- /questions/common/转场反问.md: -------------------------------------------------------------------------------- 1 | 2 | # 转场反问 3 | 4 | **你有什么想问我(面试官)的?** 5 | 6 | 考察点:主动思考能力,对公司职位的青睐性。 7 | 8 | 注意事项:建议问 1 - 3 个问题。 9 | 10 | 常见的反问: 11 | 12 | - 当前测试团队负责的业务和测试类型? 13 | - 我如果入职的话,以后从事的是哪一块的工作? 14 | - 目前测试团队的情况(人员、质量体系)? 15 | - 我哪里还不足,需要加强学习的? 16 | 17 | > 扩展阅读:[技术面试最后反问面试官的话](https://github.com/yifeikong/reverse-interview-zh) -------------------------------------------------------------------------------- /questions/dev/algorithms.md: -------------------------------------------------------------------------------- 1 | 2 | # 数据结构 3 | 4 | - 栈 5 | - 队列 6 | - 链表 7 | - 二叉树 8 | 9 | # 算法 10 | 11 | - 排序 12 | - 递归 13 | - 递推算法 14 | - 二分查找 15 | 16 | # 实战题 17 | 18 | !> leetcode 上有的题目,这里不会列出。 19 | 20 | ## 怎么解决哈希碰撞? 21 | 22 | ## 求字符串 “abcd” 的全排列 23 | 24 | ## 字符串分割成两部分对调 25 | 26 | 题目: 27 | 28 | ``` 29 | String s1 = "abcdefg",String s2="defgabc",这两个字符串有一定的规律。判断任意传入的两个字符串是否满足这样的规律。 30 | ``` 31 | 32 | 参考资料: 33 | 34 | - [字符串左移](https://blog.csdn.net/yangkaikwill/article/details/48296575) 35 | - [左旋字符串——编程珠玑和STL所想到的](https://blog.csdn.net/gzxcyy/article/details/21297043) 36 | - [九章算法面试题55 旋转字符串](http://www.bubuko.com/infodetail-802915.html) 37 | - [796. 旋转字符串](https://leetcode-cn.com/problems/rotate-string/) 38 | 39 | ## 找出一本英文小说文件中出现频率最高的单词? 40 | 41 | 延伸问法:找出一本英文小说文件中出现频率前 100 的单词? 42 | 43 | ## 一个射击运动员打靶,靶一共有 10 环,连开 10 枪打中 90 环的可能性有多少种? 44 | 45 | - [Java 递归实现](https://github.com/ly1012/qa-edu-java-all/blob/master/java-algorithms/src/main/java/topic/recursion/Shooting.java) 46 | - [数学解法](https://blog.csdn.net/ojshilu/article/details/17303537) -------------------------------------------------------------------------------- /questions/dev/db.md: -------------------------------------------------------------------------------- 1 | 2 | # 数据库 3 | 4 | ## 数据库基础 5 | 6 | - [SQL 基础](questions/dev/db/SQL基础.md) 7 | - [SQL 实战](questions/dev/db/SQL实战.md) 8 | 9 | ## MySQL 10 | 11 | - [索引](questions/dev/db/mysql索引.md) 12 | - [事务](questions/dev/db/mysql事务.md) 13 | - [其他](questions/dev/db/other.md) 14 | -------------------------------------------------------------------------------- /questions/dev/db/SQL基础.md: -------------------------------------------------------------------------------- 1 | 2 | # SQL 基础 3 | 4 | ## union 和 union all 的区别? 5 | 6 | -------------------------------------------------------------------------------- /questions/dev/db/SQL实战.md: -------------------------------------------------------------------------------- 1 | 2 | # SQL 实战 3 | 4 | ## 查询员工职能只有“开发”,没有测试的员工(eid,name) 5 | 6 | **题目:** 7 | 8 | 员工表 employee: 9 | 10 | |eid|name| 11 | |:-:|:-:| 12 | |1|u1| 13 | |2|u2| 14 | |3|u3| 15 | |4|u4| 16 | |5|u5| 17 | 18 | 职能表 role: 19 | 20 | |did|department| 21 | |:-:|:-:| 22 | |1|开发| 23 | |2|测试| 24 | 25 | 中间表 relations: 26 | 27 | |id|e_id|d_id| 28 | |:-:|:-:|:-:| 29 | |1|1|1| 30 | |2|2|1| 31 | |3|3|1| 32 | |4|1|2| 33 | |5|2|2| 34 | |6|4|2| 35 | 36 | **参考答案(未经测试):** 37 | 38 | ```sql 39 | SELECT 40 | eid, 41 | `name` 42 | FROM 43 | employee e 44 | INNER JOIN relations c ON e.eid = c.e_id 45 | INNER JOIN role d ON c.d_id = d.did 46 | WHERE 47 | ( 48 | d.department = '开发' 49 | AND e_id NOT IN ( SELECT e_id FROM relations c INNER JOIN role d ON c.d_id = d.did WHERE d.department = '测试' ) 50 | ); 51 | ``` -------------------------------------------------------------------------------- /questions/dev/db/mysql事务.md: -------------------------------------------------------------------------------- 1 | 2 | # 事务 -------------------------------------------------------------------------------- /questions/dev/db/mysql索引.md: -------------------------------------------------------------------------------- 1 | 2 | # 索引 3 | 4 | ## 索引 5 | 6 | ### 数据库索引的优缺点? 7 | 8 | ## 索引分类 9 | 10 | ### 单一索引 11 | 12 | ### 组合索引 13 | 14 | 什么是索引 15 | 索引的机制 16 | 索引的类型 17 | 索引的实现算法 -------------------------------------------------------------------------------- /questions/dev/db/other.md: -------------------------------------------------------------------------------- 1 | 2 | # 其他 3 | 4 | ## 如果 SQL 查询很慢,怎么定位问题? -------------------------------------------------------------------------------- /questions/dev/design.md: -------------------------------------------------------------------------------- 1 | 2 | # 系统架构与设计 3 | 4 | ## 设计模式 5 | 6 | - [设计模式](questions/dev/design/设计模式.md) 7 | 8 | ## 并发与锁基础 9 | 10 | - [并发与锁基础](questions/dev/design/并发与锁基础.md) 11 | 12 | ## 服务架构 13 | 14 | ### 说下对微服务的认识? 15 | 16 | ## 缓存 17 | 18 | ### 缓存淘汰策略? -------------------------------------------------------------------------------- /questions/dev/design/并发与锁基础.md: -------------------------------------------------------------------------------- 1 | 2 | # 并发基础 3 | 4 | 5 | # 锁基础 6 | 7 | ## 乐观锁 8 | 9 | ## 悲观锁 10 | 11 | -------------------------------------------------------------------------------- /questions/dev/design/设计模式.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chankit8/qa-interview/ebecb33de1a54cbb50326b3221c073ab17972512/questions/dev/design/设计模式.md -------------------------------------------------------------------------------- /questions/dev/java.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Java 技术栈 4 | 5 | ## Java 6 | 7 | - [Java 基础](questions/dev/java/Java基础.md) 8 | - [Java 容器](questions/dev/java/Java容器.md) 9 | - [Java 并发](questions/dev/java/Java并发.md) 10 | - [Java JVM](questions/dev/java/JavaJVM.md) 11 | 12 | ## 数据库 13 | 14 | ### JDBC 15 | 16 | #### JDBC 的实现原理? 17 | 18 | [一个基础又很重要的知识点:JDBC原理(基本案例和面试知识点)](https://zhuanlan.zhihu.com/p/100190437) 19 | 20 | ### MyBatis 21 | 22 | ## Spring 23 | 24 | - [Spring](questions/dev/java/spring.md) 25 | 26 | ## Dubbo 27 | 28 | - [Dubbo](questions/dev/java/dubbo.md) 29 | 30 | ## TestNG 31 | 32 | ### TestNG 有哪些注解?分别是什么作用? 33 | 34 | - @BeforeSuite/@AfterSuite 35 | - @BeforeTest/@AfterTest 36 | - @BeforeClass/@AfterClass 37 | - @BeforeMethod/@AfterMethod 38 | - @BeforeGroups/@AfterGroups 39 | - @DataProvider 40 | - @ExpectedExceptions 41 | - @Test 42 | - @Parameters 43 | - @Listeners 44 | 45 | ### TestNG 有哪些监听器?分别是什么作用? 46 | 47 | ## Maven 48 | 49 | ### 如何解决 Jar 冲突? 50 | 51 | 参考资料: 52 | 53 | 1. [Jar包冲突解决方案调研](https://juejin.im/post/5b691c8cf265da0f531e9961) 54 | 2. [重新看待Jar包冲突问题及解决方案](http://www.yangbing.club/2017/07/15/solution-for-jar-conflicts/) 55 | -------------------------------------------------------------------------------- /questions/dev/java/JavaJVM.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chankit8/qa-interview/ebecb33de1a54cbb50326b3221c073ab17972512/questions/dev/java/JavaJVM.md -------------------------------------------------------------------------------- /questions/dev/java/Java基础.md: -------------------------------------------------------------------------------- 1 | 2 |
Java 基础
3 | 4 | # 数据类型 5 | 6 | ## Java 数据类型有哪些? 7 | 8 | 提示:基本数据类型、引用类型 9 | 10 | 参考资料: 11 | 12 | 1. [基本数据类型](https://cyc2018.github.io/CS-Notes/#/notes/Java%20%E5%9F%BA%E7%A1%80?id=%e5%9f%ba%e6%9c%ac%e7%b1%bb%e5%9e%8b) 13 | 14 | ## int 和 Integer 的区别? 15 | 16 | # 面向对象 17 | 18 | ## 面向对象的特征有哪些方面? 19 | 20 | 三大基本特征:封装、继承、多态,另外还有抽象等特性。 21 | 22 | ## override 和 overload 的区别? 23 | 24 | # 异常 25 | 26 | ## 平时遇到过哪些异常? 27 | 28 | [异常](questions/dev/java/articles/异常.md) 29 | 30 | # Object 通用方法 31 | 32 | ## == 和 equals 的区别?equals 怎么实现? 33 | 34 | 35 | 36 | ## 浅拷贝和深拷贝的区别?深拷贝怎么实现? 37 | 38 | [对象拷贝](questions/dev/java/articles/对象拷贝.md) -------------------------------------------------------------------------------- /questions/dev/java/Java容器.md: -------------------------------------------------------------------------------- 1 | 2 | # Java 容器 3 | 4 | ## HashMap 和 HashTable 的区别? 5 | 6 | ## 怎么解决哈希碰撞? -------------------------------------------------------------------------------- /questions/dev/java/Java并发.md: -------------------------------------------------------------------------------- 1 | 2 | # Java 并发 3 | 4 | ## 如何理解线程安全不安全,怎么解决? 5 | 6 | ## 说说内存可见性? -------------------------------------------------------------------------------- /questions/dev/java/articles/对象拷贝.md: -------------------------------------------------------------------------------- 1 | 2 | # 对象拷贝 3 | 4 | 对象拷贝是指将现有的一个对象的所有成员属性拷贝给另一个对象。 5 | 6 | Java 对象拷贝有两种: 7 | 8 | - 浅拷贝(Shallow Copy) 9 | - 深拷贝(Deep Copy)。 10 | 11 | ## 浅拷贝 12 | 13 | 1. 创建一个新对象,将原对象的每个属性值赋值给新对象(不会递归拷贝,只拷贝该类的属性)。 14 | 2. 如果属性是基本类型,拷贝的是基本类型的值;如果属性是引用类型,拷贝的是内存地址,因此新对象对该属性的修改会影响到原对象。 15 | 16 | ### 实现 Cloneable 接口 17 | 18 | 实现对象拷贝的类,需要实现 Cloneable 接口,并覆写 clone() 方法。 19 | 20 | 通过 clone() 浅拷贝,没有 set/get 方法的 private 和 public 属性也会被拷贝。 21 | 22 | ```java 23 | public class Student implements Cloneable { 24 | 25 | //引用类型 26 | private Subject subject; 27 | //基本类型 28 | private String name; 29 | private int age; 30 | 31 | // getter setter 方法 32 | // ... 33 | 34 | /** 35 | * 重写clone()方法 36 | * @return 37 | */ 38 | @Override 39 | public Object clone() { 40 | //浅拷贝 41 | try { 42 | // 直接调用父类的 clone() 方法,进行属性一对一精确拷贝 43 | return super.clone(); 44 | } catch (CloneNotSupportedException e) { 45 | return null; 46 | } 47 | } 48 | 49 | } 50 | ``` 51 | 52 | ## 深拷贝 53 | 54 | 深拷贝解决了浅拷贝带来的安全隐患,对引用类型属性会继续拷贝,而不是直接赋值,因为引用类型变量 clone() 方法返回的是新的内存地址,所以拷贝后的对象和原对象互不干扰。 55 | 56 | > 如果一个类只包含基本数据类型和[不可变对象](https://stackoverflow.com/questions/3162665/immutable-class),使用浅拷贝也是安全的。 57 | 58 | 深拷贝相比于浅拷贝速度较慢并且花销较大。 59 | 60 | 下面介绍几种深拷贝实现的方式。 61 | 62 | ### 实现 Cloneable 接口 63 | 64 | 这种是最基本的实现方式,但实现繁琐,要求每个嵌套的对象都实现 Cloneable 接口,且对本类的引用类型属性手动拷贝。 65 | 66 | 缺点: 67 | 68 | 1. 被克隆的类及其引用类型属性的类,都必须实现 Cloneable 接口。 69 | 2. 对于 final 修饰的可变对象,由于无法重新赋值,新老对象的该属性将指向同一个地址。 70 | 71 | ```java 72 | public class Demo implements Cloneable { 73 | 74 | private String name; 75 | 76 | private String value; 77 | 78 | private DemoInternal demoInternal; 79 | 80 | /*省略getter和setter方法*/ 81 | 82 | @Override 83 | public Demo clone() { 84 | Demo demo = null; 85 | try { 86 | demo = (Demo) super.clone(); //浅复制 87 | } catch (CloneNotSupportedException e) { 88 | e.printStackTrace(); 89 | } 90 | demo.demoInternal = demoInternal.clone(); //深度复制 91 | return demo; 92 | } 93 | } 94 | ``` 95 | 96 | ### 实现 Serializable 接口 97 | 98 | 原对象类型及其成员对象类型(包括嵌套)都需要实现 Serializable 接口,一个都不能少。 99 | 100 | 相比实现 Cloneable 接口,实现简单,效率比 clone 方法低些。并且可以解决 final 修饰的可变对象问题。 101 | 102 | ```java 103 | 104 | import java.io.ByteArrayInputStream; 105 | import java.io.ByteArrayOutputStream; 106 | import java.io.ObjectInputStream; 107 | import java.io.ObjectOutputStream; 108 | import java.io.Serializable; 109 | 110 | /** 111 | * 序列化与反序列化:通过字节流序列化实现深拷贝,需要深拷贝的对象(包括嵌套)必须实现 Serializable 接口 112 | * 113 | * @author Administrator 114 | */ 115 | public class CloneUtils { 116 | @SuppressWarnings("unchecked") 117 | public static T clone(T obj) { 118 | T cloneObj = null; 119 | try { 120 | // 写入字节流 121 | ByteArrayOutputStream out = new ByteArrayOutputStream(); 122 | ObjectOutputStream obs = new ObjectOutputStream(out); 123 | obs.writeObject(obj); 124 | obs.close(); 125 | 126 | // 分配内存,写入原始对象,生成新对象 127 | ByteArrayInputStream ios = new ByteArrayInputStream(out.toByteArray()); 128 | ObjectInputStream ois = new ObjectInputStream(ios); 129 | // 返回生成的新对象 130 | cloneObj = (T) ois.readObject(); 131 | ois.close(); 132 | } catch (Exception e) { 133 | e.printStackTrace(); 134 | } 135 | return cloneObj; 136 | } 137 | } 138 | ``` 139 | 140 | 或者使用 `SerializationUtils.clone(Object obj)` 方法。 141 | 142 | ## 参考资料 143 | 144 | 1. [Java 浅拷贝和深拷贝](https://www.jianshu.com/p/94dbef2de298) 145 | 2. [【java】深拷贝实现的两种方式](https://blog.csdn.net/zyxhangiian123456789/article/details/98630429) -------------------------------------------------------------------------------- /questions/dev/java/articles/异常.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # 异常 4 | 5 | ## 异常分类 6 | 7 | ### 受检查异常 8 | 9 | 程序必须处理,否则编译不通过。 10 | 11 | ### 非检查异常 12 | 13 | > 派生于 Error 类或 RuntimeException 类的所有异常成为非检查异常(unchecked)。 14 | 15 | #### 运行时异常(RuntimeException) 16 | 17 | 运行时异常都是 RuntimeException 类及其子类,如 NullPointerException、IndexOutOfBoundsException。 18 | 19 | 运行时异常的特点: 20 | * 非检查异常:编译器不会检查这些异常,程序中可以选择捕获处理,也可以不处理,程序不处理也会编译通过。 21 | * 一般是由程序逻辑错误引起的,程序应该从逻辑角度尽可能避免这类异常的发生。 22 | 23 | 24 | ## 常见的异常 25 | 26 | [Java 中的常见异常](https://www.processon.com/view/link/5ecf8b12f346fb6907231a8b) 27 | 28 | ### java.lang.NullPointerException 29 | 30 | **变量未初始化,被调用方法的对象为 null** 31 | 32 | ```java 33 | String s = null; 34 | System.out.println(s.length()); 35 | ``` 36 | 37 | **变量未初始化,访问 null 对象属性** 38 | 39 | ```java 40 | String[] s = null; 41 | System.out.println(s.length); 42 | ``` 43 | 44 | **数组元素未初始化** 45 | 46 | 数组的初始化是对数组分配需要的空间,而初始化后的数组,其中的元素并没有实例化,在调用时出现异常。 47 | 48 | ```java 49 | String[] s = new String[5]; 50 | System.out.println(s[0].length()); 51 | ``` 52 | 53 | **方法传入的参数为 null** 54 | 55 | ```java 56 | @Test(description = "空指针异常测试:方法传入参数为 null") 57 | public void testNullPointerException3(){ 58 | nullPointerException3(null); 59 | } 60 | 61 | private void nullPointerException3(Object o){ 62 | System.out.println(o.hashCode()); 63 | } 64 | ``` 65 | 66 | **方法返回值为 null** 67 | 68 | ```java 69 | HashMap map = new HashMap(); 70 | map.put("a",null); 71 | System.out.println(map.get("a").length()); 72 | ``` 73 | 74 | 参考资料: 75 | 76 | 1. [Java避免NullPointerException的一些技巧](https://blog.csdn.net/u014691866/article/details/82689403) 77 | 78 | ### java.lang.ClassNotFoundException 79 | 80 | 调用 Class.forName() 81 | 82 | ```java 83 | Class.forName("a.b.c.ClassA"); 84 | ``` 85 | 86 | ClassLoader 中的 loadClass() 87 | 88 | ```java 89 | this.getClass().getClassLoader().loadClass("a.b.c.ClassA"); 90 | ``` 91 | 92 | ClassLoader 中的 findSystemClass() 93 | 94 | > 自定义 ClassLoader 重写 findClass() 方法,这时可以调用 findSystemClass() 方法。 95 | 96 | ```java 97 | protected final Class findSystemClass(String name) 98 | throws ClassNotFoundException 99 | { 100 | ClassLoader system = getSystemClassLoader(); 101 | if (system == null) { 102 | if (!checkName(name)) 103 | throw new ClassNotFoundException(name); 104 | Class cls = findBootstrapClass(name); 105 | if (cls == null) { 106 | throw new ClassNotFoundException(name); 107 | } 108 | return cls; 109 | } 110 | return system.loadClass(name); 111 | } 112 | ``` 113 | 114 | ### java.lang.ClassCastException 115 | 116 | ```java 117 | @Test(description = "java.lang.ClassCastException: java.lang.Object cannot be cast to entity.Person") 118 | public void testClassCastException() { 119 | Person person = (Person) new Object(); 120 | } 121 | ``` 122 | 123 | ### java.lang.CloneNotSupportedException 124 | 125 | 当类没有实现 Cloneable 接口或者不支持克隆方法(这种情况是什么?)时,调用 super.clone() 方法则抛出该异常。 126 | 127 | ```java 128 | @Test(description = "没有实现 Cloneable 接口:java.lang.CloneNotSupportedException: exception.sample.CloneNotSupportedExceptionTest") 129 | public void testCloneNotSupportedException() throws CloneNotSupportedException { 130 | super.clone(); 131 | } 132 | ``` 133 | 134 | ### java.lang.ArrayIndexOutOfBoundsException 135 | 136 | ```java 137 | String[] s = {"a", "b", "c"}; 138 | System.out.println(s[3]); 139 | ``` 140 | 141 | ### java.lang.ArrayStoreException 142 | 143 | ```java 144 | @Test(description = "java.lang.ArrayStoreException: java.lang.String") 145 | public void testArrayStoreException() { 146 | Object[] data = new Integer[3]; 147 | data[0] = "abc"; 148 | } 149 | ``` 150 | 151 | ### java.lang.FileNotFoundException 152 | 153 | ```java 154 | @Test(description = "java.io.FileNotFoundException: z:\\a.txt (系统找不到指定的路径。)") 155 | public void testFileNotFoundException() throws FileNotFoundException { 156 | File file = new File("z:/a.txt"); 157 | BufferedReader reader = new BufferedReader(new FileReader(file)); 158 | try { 159 | reader.close(); 160 | } catch (IOException e) { 161 | e.printStackTrace(); 162 | } 163 | } 164 | ``` 165 | 166 | ### java.io.IOException 167 | 168 | 见 [java.lang.FileNotFoundException](#java.lang.FileNotFoundException) 169 | 170 | ### java.lang.NumberFormatException 171 | 172 | ```java 173 | int a = Integer.valueOf("12-3"); 174 | ``` 175 | 176 | ### java.lang.IllegalArgumentException 177 | 178 | ```java 179 | @Test(description = "java.lang.IllegalArgumentException: Cannot format given Object as a Date") 180 | public void testIllegalArgumentException() { 181 | SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM"); 182 | String format = dateFormat.format("2020-05"); 183 | System.out.println(format); 184 | } 185 | ``` 186 | 187 | ### java.lang.ArithmeticException 188 | 189 | ```java 190 | @Test(description = "java.lang.ArithmeticException: / by zero") 191 | public void testArithmeticException() { 192 | System.out.println(5/0); 193 | } 194 | ``` 195 | 196 | ### java.lang.InstantiationException 197 | 198 | 1. 通过反射实例化注解、接口、抽象类等,导致实例化异常 199 | 2. 类中没有无参构造器 200 | 201 | ```java 202 | @Test(description = "注解无法实例化 java.lang.InstantiationException: org.testng.annotations.Test") 203 | public void testInstantiationException() throws IllegalAccessException, InstantiationException { 204 | Test calendar = Test.class.newInstance(); 205 | } 206 | ``` 207 | 208 | ### java.lang.NoSuchFieldException 209 | 210 | 见 [java.lang.IllegalAccessException](#java.lang.IllegalAccessException) 211 | 212 | ### java.lang.NoSuchMethodException 213 | 214 | 略 215 | 216 | ### java.lang.IllegalAccessException 217 | 218 | ```java 219 | public class IllegalAccessExceptionTest { 220 | 221 | @Test 222 | public void testIllegalAccessException() throws ClassNotFoundException, IllegalAccessException, NoSuchFieldException { 223 | Class clazz = Class.forName("exception.sample.AccessDemo"); 224 | Field field = clazz.getDeclaredField("name"); 225 | //fields[0].setAccessible(true); //设置可访问 226 | field.set(new AccessDemo(), "ss"); 227 | } 228 | 229 | } 230 | 231 | class AccessDemo{ 232 | 233 | private String name; 234 | 235 | } 236 | ``` 237 | 238 | ### java.sql.SQLException 239 | 240 | ```java 241 | //获取数据库连接 242 | Connection conn = null; 243 | try { 244 | conn = DriverManager.getConnection( 245 | "jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf-8&useSSL=false&serverTimezone=UTC", 246 | "root", 247 | "****"); 248 | } catch (SQLException throwables) { 249 | throwables.printStackTrace(); 250 | }finally { 251 | if (conn != null){ 252 | try { 253 | conn.close(); 254 | } catch (SQLException throwables) { 255 | throwables.printStackTrace(); 256 | } 257 | } 258 | } 259 | ``` 260 | 261 | ### java.lang.OutOfMemoryError 262 | 263 | ```java 264 | //设置 JVM 参数:-Xms2m -Xmx2m 265 | @Test(description = "Exception in thread \"main\" java.lang.OutOfMemoryError: Java heap space") 266 | public void testOutOfMemoryError() { 267 | List list = new ArrayList<>(); 268 | while (true){ 269 | list.add(UUID.randomUUID().toString()); 270 | } 271 | } 272 | ``` 273 | 274 | ### java.lang.AssertionError 275 | 276 | ```java 277 | @Test(description = "java.lang.AssertionError: 计算 1 + 1,预期值:3,实际值 2 ") 278 | public void testAssertionError() { 279 | assert 1 + 1 == 3 : "计算 1 + 1,预期值:3,实际值 2 "; 280 | } 281 | ``` 282 | 283 | ## try-with-resources 284 | 285 | ### 语法 286 | 287 | try-with-resources 语法: 288 | 289 | ```java 290 | try(Resources res = ...){ 291 | // work with res,记为工作区 292 | } 293 | ``` 294 | 295 | 1. try() 中的资源类需要实现 {@link AutoCloseable} 接口,编译时生成调用 close() 方法的代码 296 | 2. try() 中的变量隐式声明为 final,因为如果在 try 块中修改变量引用,将导致之前引用的资源无法关闭 297 | 3. try() 中可以有多个资源,多个资源用 ; 隔开 298 | 299 | try-with-resources 使用: 300 | 301 | 1. 限制1:资源类必须实现 AutoCloseable 接口 302 | 1. 限制2:资源不能重新赋值 303 | 3. 建议1:如果有三个以上资源,编译后的 try 嵌套较深,不建议使用该语法 304 | 305 | try-with-resources 异常: 306 | 307 | 1. 将第一个抛出的异常作为最终异常(可能是工作区异常,也可能是 close() 抛出的异常) 308 | 2. 在外层的 catch 块中,将 close() 抛出的异常(如果有)作为被抑制异常加入最终异常的被抑制异常列表。 309 | 310 | ### 编译规则 311 | 312 | 1. 将 try() 中的资源声明和初始化代码,编译进 try 块中。 313 | 2. 如果有多个资源,编译后结构,按照资源声明顺序嵌套。 314 | 315 | ### 编译前结构 316 | 317 | ```java 318 | try(资源 R1; 资源 R2; ...; 资源 RN){ 319 | //try 代码块,记为工作区 B 320 | } 321 | ``` 322 | 323 | ### 编译后结构 324 | 325 | > 这里讨论的编译后结构是指编译后外层 Try 块中的代码结构。 326 | 327 | 当只有一个资源时: 328 | 329 | ```java 330 | Resources resources = new Resources(); //try() 中的第一个资源 331 | Throwable copy = null; //声明一个异常变量,用于追加被抑制异常到真实异常 332 | 333 | try { 334 | // try 块内容,记为 R1_Try。当只有一个资源时,R1_Try = B。 335 | } catch (Throwable e) { //try 块抛出的异常,这里我们暂时称呼它为真实异常 336 | copy = e; //将真实异常对象的引用赋值给 copy 337 | throw e; //抛出真实异常,注意到这里只是为了提高真实异常作用域的范围 338 | } finally { 339 | if (resources != null) { //如果资源不为 null 340 | if (copy != null) { //如果发生了真实异常 341 | try { 342 | resources.close(); //关闭资源 343 | } catch (Throwable e) { //关闭资源是抛出异常 344 | copy.addSuppressed(e); //因为已经有真实异常,将资源关闭异常作为被抑制异常处理 345 | } 346 | } else { //如果没发生真实异常,直接调用 close() 关闭资源 347 | resources.close(); //如果 close() 抛出异常,将作为上一层的真实异常处理 348 | } 349 | } 350 | } 351 | ``` 352 | 353 | 当有两个资源时: 354 | 355 | 1. 第二个资源的编译后结构,和只有一个资源时的编译后结构相同,其中 R2_Try = B。 356 | 2. 第一个资源的编译后结构,和只有一个资源时的编译后结构相同,其中 R1_Try = 第二个资源的编译后内容。 357 | 358 | 当有多个资源时: 359 | 360 | 1. 倒数第一个资源 RN 的编译后结构,和只有一个资源时的编译后结构相同,其中 RN_Try = B。 361 | 2. 倒数第 N-1 个资源 RN-1 的编译后结构,和只有一个资源时的编译后结构相同,其中 RN-1_Try = RN_Try。 362 | 3. 多个资源,以此类推,重复第 2 步。 363 | 364 | 365 | 366 | -------------------------------------------------------------------------------- /questions/dev/java/dubbo.md: -------------------------------------------------------------------------------- 1 | 2 | # Dubbo 3 | 4 | ## Dubbo 原理 5 | 6 | ### 消费者本地调用服务者方法的原理? 7 | 8 | 提示: 9 | 10 | 1. 注册、订阅 11 | 1. 消费者加载 consumer.xml 12 | 1. 代码中通过 context.getBean (Dubbo 自定义了 BeanDefinition) 获取一个接口的代理类对象 13 | 1. 调用接口方法时,根据负载均衡策略选择一个服务者 14 | 1. 代理类对象编码请求信息,通过 socket 发送到服务者 15 | 1. 服务者收到请求信息后,解码并调用实现类方法得到响应信息,编码响应信息通过 socket 发送给消费者。 16 | 1. 服务者解码响应信息 17 | 1. 最终返回方法返回值 18 | -------------------------------------------------------------------------------- /questions/dev/java/spring.md: -------------------------------------------------------------------------------- 1 | 2 | # Spring 3 | 4 | ## Spring Bean 5 | 6 | ### SpringBoot @Component 和 @Service 有什么区别?怎么实现的? 7 | 8 | ## Spring AOP 9 | 10 | ### Spring AOP 原理? 11 | 12 | ### 静态代理和动态代理优缺点和应用场景? 13 | 14 | ### 为什么动态代理慢? 15 | 16 | -------------------------------------------------------------------------------- /questions/dev/network.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # HTTP 4 | 5 | ## 浏览器输入 URL 后发生了什么? 6 | 7 | 参考资料: 8 | 9 | 1. [细说浏览器输入URL后发生了什么](https://segmentfault.com/a/1190000012092552) 10 | 11 | ## HTTP 代理的原理? 12 | 13 | 参考资料: 14 | 15 | 1. [HTTP 代理原理及实现(一)](https://imququ.com/post/web-proxy.html) 16 | 17 | 18 | ## HTTP 协议常见状态码? 19 | 20 | 21 | ## 为什么 HTTPS 比 HTTP 安全? 22 | 23 | 24 | ## cookie、session、token 的区别? 25 | 26 | 27 | ## get 和 post 区别? -------------------------------------------------------------------------------- /questions/dev/os.md: -------------------------------------------------------------------------------- 1 | 2 | # 操作系统 3 | 4 | ## 计算机操作系统 5 | 6 | - [计算机操作系统](questions/dev/os/计算机操作系统.md) 7 | 8 | ## Linux 9 | 10 | ### 说下知道的 linux 命令,越多越好。 11 | 12 | ### 如何在 linux 目录下找到最大的三个文件? 13 | 14 | 15 | ### 查询文件中某个字符串出现的次数,用 linux 命令写出来? 16 | 17 | ### 用 shell 写个定时任务? 18 | -------------------------------------------------------------------------------- /questions/dev/os/计算机操作系统.md: -------------------------------------------------------------------------------- 1 | 2 | # 计算机操作系统 3 | 4 | ## 进程管理 5 | 6 | ### 进程与线程的区别? -------------------------------------------------------------------------------- /questions/dev/python.md: -------------------------------------------------------------------------------- 1 | 2 | # Python 技术栈 3 | 4 | -------------------------------------------------------------------------------- /questions/manage/管理.md: -------------------------------------------------------------------------------- 1 | 2 | # 管理 3 | 4 | ## 平时怎么管理项目的? 5 | 6 | 7 | ## 如果测试周期很短,如何制定测试策略,来保证产品质量? 8 | 9 | - 测试对象 10 | - 申请将低优先级的需求延期到下一版本 11 | - 测试资源 12 | - 申请测试资源:增加测试人手、延长测试周期 13 | - 加班 14 | - 测试效率 15 | - 引入工具和自动化,如快速准备测试数据、部分用例实行自动化 16 | - 在开发阶段就介入测试: 17 | - 部分功能开发完成后,便开始测试 18 | - 提测前完成需求分析、用例设计及评审 19 | - 产品质量 20 | - 降低质量要求:砍掉低优先级的用例,缩小测试范围,避免大的问题发生 21 | 22 | 23 | ## 团队是怎么划分的,团队的结构是什么样的? 24 | 25 | ## 怎么给团队成员制定绩效并考核? 26 | 27 | 28 | ## 带团队过程中面临过的最大问题是什么? 29 | 30 | 31 | ## 如何跟产品、研发等其他团队协作? 32 | 33 | 34 | ## 最看重团队成员的什么特质? 35 | 36 | 37 | -------------------------------------------------------------------------------- /questions/test/proxy.md: -------------------------------------------------------------------------------- 1 | 2 | # 代理与Mock 3 | 4 | ## 实战 5 | 6 | ### Mock 如何和自动化对接的? 7 | 8 | 9 | ### 如何做到无侵入 Mock? -------------------------------------------------------------------------------- /questions/test/前端测试.md: -------------------------------------------------------------------------------- 1 | 2 | # 前端自动化 3 | 4 | ## 基础与实战 5 | 6 | ### Web 自动化遇到了哪些难题? 7 | 8 | ### 如何保证测试用例的独立性和可重复运行? 9 | 10 | ### 如何保证自动化的稳定性? 11 | 12 | ### Page Object 模式? 13 | 14 | ## Selenium 15 | 16 | ### Selenium 工作原理? 17 | 18 | 参考资料: 19 | 20 | 1. [Selenium 工作原理](https://segmentfault.com/a/1190000022207984) 21 | 22 | 23 | -------------------------------------------------------------------------------- /questions/test/服务端测试.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # 接口自动化 4 | 5 | ## 基础与实战 6 | 7 | ### 如何保证测试用例的独立性和可重复运行? 8 | 9 | ### 一个用例有多个接口调用时,接口间的参数传递如何做的? 10 | 11 | ### 自动化关注哪些指标,怎么考核自动化? 12 | 13 | 14 | ### 怎么保证自动化的稳定性? 15 | 16 | ### 如果出现自动化用例大面积失败,排查费时,怎么解决? -------------------------------------------------------------------------------- /questions/test/测试基础.md: -------------------------------------------------------------------------------- 1 | 2 |
测试基础
3 | 4 | # 用例设计 5 | 6 | ## 黑盒测试用例设计方法? 7 | 8 | - 等价类划分 9 | - 边界值分析 10 | - 判定表 11 | - 正交实验法 12 | - 因果图 13 | - 状态迁移 14 | - 错误推测法 15 | 16 | 具体用法请自行学习。 17 | 18 | ## 白盒测试用例设计方法? 19 | 20 | - 语句覆盖 21 | - 判定覆盖(又叫分支覆盖) 22 | - 条件覆盖 23 | - 判定/条件覆盖 24 | - 条件组合覆盖(又叫多重条件覆盖) 25 | - 路径覆盖 26 | 27 | 具体用法请自行学习。 28 | 29 | ## 设计某个场景的用例 30 | 31 | 1. 测试淘宝登录页面?登录时要不要加验证码?什么情况下加? 32 | 33 | 测试用例设计: 34 | - 界面 35 | - 文案、样式、布局 36 | - 易用性 37 | - 图标、提示、布局(是否符合用户习惯) 38 | - 登录失败多次后,是否锁定账号 39 | - 功能性 40 | - 正常登录 41 | - 正确的用户名和密码 42 | - 登录 - 退出 - 登录 43 | - 多平台上登录(取决于需求:是否允许同时登录) 44 | - 多设备上登录 45 | - 多浏览器登录 46 | - 快捷登录 47 | - 支付宝登录 48 | - 登录跳转(从其他页面跳转过来登录) 49 | - Tab键、Enter键是否响应 50 | - 异常登录 51 | - 异地登录:非常用地区登录、国外登录 52 | - 错误的用户名(账号不存在) 53 | - 错误的密码 54 | - 账号被冻结登录 55 | - 登录服务挂掉时提示 56 | - 兼容性 57 | - PC 浏览器兼容性:不同浏览器、不同版本 58 | - H5 登录测试 59 | - 手机浏览器登录 60 | - 设备兼容性:不同终端设备、不同版本 61 | - 接口测试 62 | - 各种参数组合 63 | - 安全性 64 | - 多次登录失败 65 | - 频繁登录 66 | - SQL 注入 67 | - 容错性 68 | - 某个服务节点挂掉,登录 69 | - 删除用户缓存后登录 70 | - 性能 71 | - 大量用户同时登录 72 | - 竞品测试 73 | - 其他同类产品登录:体验、性能 74 | - CDN 75 | - 登录时的响应服务器地区 76 | - 网络 77 | - 断网 78 | - 弱网 79 | - 内网 80 | - 外网 81 | - 运营商(移动、联通、电信手机流量登录) 82 | - wifi 登录 83 | - 线上测试 84 | - 发布后线上验证测试 85 | 86 | 什么情况下加验证码: 87 | 88 | - 用户异地登录 89 | - 用户登录失败次数过多 90 | - 新设备登录 91 | - 用户频繁登录退出(要加?不确定) 92 | 93 | 94 | 验证码的用途: 95 | 96 | - 防止撞库攻击、暴力破解 97 | - 防止重放攻击 98 | - 防止爬虫和机器人 99 | - 防止大规模批量动作:大规模注册账号、批量发帖 100 | - 验证用户身份(如注册、支付、找回密码时的手机、邮箱验证码) 101 | 102 | 2. 测试淘宝的商品搜索功能? 103 | 3. 测试京东订单支付功能? 104 | 4. 测试支付宝转账功能? 105 | 5. 测试一个水杯。 106 | 107 | # 缺陷管理 108 | 109 | ## 缺陷的生命周期? 110 | 111 | # 测试策略/质量保障 112 | 113 | ## 如何保证线上质量? 114 | 115 | 应对策略:提前预防、及时发现、快速处理、故障复盘 116 | 117 | 线上质量问题包括哪些? 118 | 119 | 1. 需求评审、测试分析等阶段遗漏导致的问题,包括特殊场景下触发的Bug 120 | 2. 由于网络、运营配置等导致的错误 121 | 122 | **提前预防** 123 | 124 | 发布前预防: 125 | 126 | - 需求阶段:需求评审 127 | - 开发阶段:代码Review、系统设计评审、单元测试 128 | - 测试阶段:用例内审(交叉评审)、用例外审、各种类型测试 129 | - 运维阶段:测试通过,部署内容交接核对 130 | - 运营配置:运营配置 131 | - 验收测试:α、β验收测试、灰度测试,发布前各项检查 132 | 133 | **及时发现** 134 | 135 | 线上监控: 136 | 137 | - 接口监控 138 | - UI 监控 139 | - 日志监控 140 | 141 | 实时告警:邮件告警、短信告警、钉钉微信等告警 142 | 143 | **快速处理** 144 | 145 | 1. 在预发布环境(没有就在测试环境)复现缺陷 146 | 2. 针对具体情况,不同的处理方式: 147 | - 版本回退 148 | - 关闭问题机器 149 | - 热修复 150 | - 延迟到下一个版本 151 | - 资产追回与补偿 152 | 153 | **故障复盘** 154 | 155 | 1. 确定问题属性:发生原因、严重程度、问题类型、问题描述、责任人等。 156 | 2. 预防再次发生: 157 | - 如果是缺陷,补充到用例库 158 | - 如果是流程规范,优化改进流程规范 159 | - 如果是人为疏忽,对责任人进行追责 160 | 161 | 162 | ## 测试环境和线上环境如何保持一致? 163 | 164 | ## 对于复杂的微服务(上千个)系统,怎么理清服务间的调用,给出微服务系统的测试方案? 165 | 166 | # 流程规范 167 | 168 | ## 说下公司的研发流程 169 | 170 | 有什么优缺点?执行的问题,是否解决,怎么解决? 171 | 172 | ## 说下上个公司的测试流程? 173 | 174 | 考察点: 175 | 176 | - 了解与本公司的测试流程是否接近,测试流程是否正规。 177 | - 对测试流程和质量工作是否有很清晰的认识。 178 | 179 | # 过程改进 180 | 181 | ## 测试过程中,怎么提高效率? 182 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /questions/test/移动端测试.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # 移动端测试基础与实战 4 | 5 | ## 移动端专项测试关注哪些方面? 6 | 7 | 兼容性、流量、耗电量、网络(无线、2G、3G、4G、5G、软网)、安装卸载。与其他系统的兼容性、稳定性等等。 8 | 9 | # 移动端自动化 10 | 11 | 12 | # 移动端性能测试 13 | -------------------------------------------------------------------------------- /questions/work/工作总结.md: -------------------------------------------------------------------------------- 1 | 2 | # 工作总结 3 | 4 | ## 遇到过哪些困难,怎么解决的? 5 | 6 | 考察点: 7 | * 考察个人是否做过真正有压力的事情 8 | * 考察个人面对压力的工作态度是否积极 9 | * 困难的事情是为别人还是为自己 10 | 11 | ## 测试过程中遇到过哪些问题,怎么解决的? 12 | 13 | 14 | ## 说下三个最有价值的Bug? 15 | 16 | 考察点: 17 | 18 | - 怎么发现的?怎么解决的?怎么预防后续问题? 19 | 20 | 等价问法: 21 | 22 | - 你印象最深的Bug是什么,怎么发现和解决的? 23 | - 遇到的逻辑性最强的一个BUG是什么? 24 | 25 | ## 最有成就感的一件事是什么? 26 | 27 | 提示:可以是做过的工具、学习、解决的问题,或工作之外的事。 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /questions/work/职业观.md: -------------------------------------------------------------------------------- 1 | 2 | # 职业观 3 | 4 | ## 你觉得测试在软件研发中是什么角色? 5 | 6 | 7 | ## 你觉得一个合格的测试应该具备什么素质? 8 | 9 | 10 | ## 说说对测试行业的理解? 11 | 12 | 13 | ## 为什么要离开上一家公司? 14 | 15 | 16 | ## 这段工作空窗期是什么原因? 17 | 18 | 19 | ## 说说你的职业规划 20 | 21 | -------------------------------------------------------------------------------- /questions/work/项目经历.md: -------------------------------------------------------------------------------- 1 | 2 | # 项目经历 3 | 4 | ## 业务测试 5 | 6 | 说下最熟悉的一个项目。 7 | 8 | 面试官可能会从业务架构、业务流程、业务细节、被测系统架构及技术、研发流程、测试环境、测试策略、测试风险点、测试效率、线上环境、线上质量、遇到的问题及解决方案、可改进点及解决思路或计划等方面追问。 9 | 10 | ## 效能 11 | 12 | 说下简历中的 XX 工具/平台/方案。 13 | 14 | 面试官可能会从研发背景、技术选型、投入成本、工具/方案设计、工具/方案使用、落地效果、解决了哪些问题、与开源工具/方案相比有什么明显优势、遇到的问题及解决方案、可改进点及解决思路或计划等方面追问。 -------------------------------------------------------------------------------- /sw.js: -------------------------------------------------------------------------------- 1 | /* =========================================================== 2 | * docsify sw.js 3 | * =========================================================== 4 | * Copyright 2016 @huxpro 5 | * Licensed under Apache 2.0 6 | * Register service worker. 7 | * ========================================================== */ 8 | 9 | const RUNTIME = 'docsify' 10 | const HOSTNAME_WHITELIST = [ 11 | self.location.hostname, 12 | 'fonts.gstatic.com', 13 | 'fonts.googleapis.com', 14 | 'unpkg.com' 15 | ] 16 | 17 | // The Util Function to hack URLs of intercepted requests 18 | const getFixedUrl = (req) => { 19 | var now = Date.now() 20 | var url = new URL(req.url) 21 | 22 | // 1. fixed http URL 23 | // Just keep syncing with location.protocol 24 | // fetch(httpURL) belongs to active mixed content. 25 | // And fetch(httpRequest) is not supported yet. 26 | url.protocol = self.location.protocol 27 | 28 | // 2. add query for caching-busting. 29 | // Github Pages served with Cache-Control: max-age=600 30 | // max-age on mutable content is error-prone, with SW life of bugs can even extend. 31 | // Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. 32 | // Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 33 | if (url.hostname === self.location.hostname) { 34 | url.search += (url.search ? '&' : '?') + 'cache-bust=' + now 35 | } 36 | return url.href 37 | } 38 | 39 | /** 40 | * @Lifecycle Activate 41 | * New one activated when old isnt being used. 42 | * 43 | * waitUntil(): activating ====> activated 44 | */ 45 | self.addEventListener('activate', event => { 46 | event.waitUntil(self.clients.claim()) 47 | }) 48 | 49 | /** 50 | * @Functional Fetch 51 | * All network requests are being intercepted here. 52 | * 53 | * void respondWith(Promise r) 54 | */ 55 | self.addEventListener('fetch', event => { 56 | // Skip some of cross-origin requests, like those for Google Analytics. 57 | if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { 58 | // Stale-while-revalidate 59 | // similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale 60 | // Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 61 | const cached = caches.match(event.request) 62 | const fixedUrl = getFixedUrl(event.request) 63 | const fetched = fetch(fixedUrl, { cache: 'no-store' }) 64 | const fetchedCopy = fetched.then(resp => resp.clone()) 65 | 66 | // Call respondWith() with whatever we get first. 67 | // If the fetch fails (e.g disconnected), wait for the cache. 68 | // If there’s nothing in cache, wait for the fetch. 69 | // If neither yields a response, return offline pages. 70 | event.respondWith( 71 | Promise.race([fetched.catch(_ => cached), cached]) 72 | .then(resp => resp || fetched) 73 | .catch(_ => { /* eat any errors */ }) 74 | ) 75 | 76 | // Update the cache with the version we fetched (only for ok status) 77 | event.waitUntil( 78 | Promise.all([fetchedCopy, caches.open(RUNTIME)]) 79 | .then(([response, cache]) => response.ok && cache.put(event.request, response)) 80 | .catch(_ => { /* eat any errors */ }) 81 | ) 82 | } 83 | }) -------------------------------------------------------------------------------- /阅前必读.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # 阅前必读 4 | 5 | !> 鉴于水平、精力有限,难免有疏漏和不足,如果错误和不足之处或过时信息,请及时反馈。部分题目或答案来源于网络,如有侵权,请及时联系 qadoc_org@163.com 删除。 6 | 7 | ## 适用对象 8 | 9 | - 软件测试工程师 10 | - 自动化测试工程师 11 | - 性能测试工程师 12 | - 测试开发工程师 13 | - 测试组长/测试经理 14 | 15 | ## 笔记功效 16 | 17 | 1. 学会制作简历。 18 | 1. 避免面试踩坑。 19 | 1. 面试前能力检测。 20 | 1. 测试知识、思路学习。 21 | 22 | ## 面试考察点 23 | 24 | > 面试是一场考试,考察的是平时积累的能力,为面试做准备是一个时时刻刻都可以进行的过程。但为了保证充分发挥自身实力,强烈建议做好面前准备。 25 | 26 | - 实战经验、工作总结 27 | - 技术 28 | - 测试技术 29 | - 开发技术 30 | - 软实力 31 | - 做事能力与思维 32 | - 发现问题的能力 33 | - 解决问题的能力 34 | - 做事效率、积极性 35 | - 落地效果 36 | - 目标导向、结果导向 37 | - 沟通表达能力 38 | - 快速学习能力 39 | - 平均成长速率 = 累计工作能力/累计工作年限 40 | - 抗压能力(皮实) 41 | - 心态 42 | - 责任心:做事兜底能力 43 | - 应聘者的亮点 44 | 45 | ## 阅读建议 46 | 47 | ### 确定复习目标 48 | 49 | 1. 企业:*岗位需要什么能力*,可从岗位级别、岗位要求等信息中提取。分类:必要项、加分项。 50 | 2. 个人:*我能为该岗位创造什么价值*,可从自身经历和个人能力等方面分析。分类:工作经验与总结、技术、软能力。 51 | 52 | ### 细化复习范围 53 | 54 | !> 可参考下面列出的点,结合自身情况和岗位情况,制定具体的复习范围。 55 | 56 | #### 工作经验与总结 57 | 58 | > 考察点:实战经验、思考深度、总结能力、解决问题能力 59 | 60 | :bookmark: 业务项目 61 | 62 | 业务架构、业务流程、业务细节、被测系统架构及技术、研发流程、测试环境、测试策略、测试风险点、测试效率、线上环境、线上质量、遇到的问题及解决方案、可改进点及解决思路或计划。 63 | 64 | :bookmark: 工具/方案 65 | 66 | 研发背景、技术选型、投入成本、工具/方案设计、工具/方案使用、落地效果、解决了哪些问题、与开源工具/方案相比有什么明显优势、遇到的问题及解决方案、可改进点及解决思路或计划。 67 | 68 | :bookmark: 团队管理 69 | 70 | 人:招人、选人、育人、用人,以及工作激励、冲突处理、人才梯队等。 71 | 事:任务分配、绩效考核、跨团队资源协调 72 | 果:团队整体水平提升、质量体系建设 73 | 74 | :bookmark: 测试项目管理 75 | 76 | 测试计划、进度把控、质量把控 77 | 78 | #### 技术 79 | 80 | :bookmark: 测试技术 81 | 82 | 测试技能:测试基础、单元测试、服务端自动化、前端自动化、移动端自动化、性能测试、安全测试、精准测试、敏捷测试、智能化测试、DevOps 83 | 84 | 测试工具:与测试技能相关的工具、自研工具/平台/方案 85 | 86 | :bookmark: 开发技术 87 | 88 | 编程语言及常用框架、组件 89 | 编程能力:设计模式、数据结构、算法 90 | 系统架构 91 | 网络、协议、规范 92 | 数据库技术 93 | Linux 94 | 95 | #### 软能力 96 | 97 | 沟通表达能力 98 | 快速学习能力 99 | 发现、解决问题能力 100 | 抗压能力(皮实) 101 | 好的心态 102 | 103 | ### 制定复习计划 104 | 105 | 1. 工作经验与总结,需要平时注意思考、解决、记录 106 | 2. 快速复习已掌握的知识点 107 | 3. 学习不会的知识点并输出笔记 108 | 4. 针对性的刷刷题,比如算法。刷题前自己务必先思考并回答,其次查阅资料作答,最后才是看参考答案。 109 | 5. 场景模拟练习:自己或其他人模拟面试官 110 | 111 | 以上是一些建议,具体计划还需结合自身情况和时间制定,尽量将复习点均摊到每日并坚持。 112 | 113 | !> 请勿死记硬背面试题库,第一:不理解的东西很容易忘,第二:不利于培养自己的学习思考能力,第三:面试过程中无法举一反三、随机应变。 114 | 115 | ## 反馈&建议 116 | 117 | 点击 [这里](https://github.com/qadoc/qa-interview/issues) 提交问题、问题答案或建议、反馈。 118 | 119 | 120 | 121 | --------------------------------------------------------------------------------