According to the opinion of the Rambam, of blessed memory, every relative is trustworthy to testify, even her adult son and daughter, and every minor, even if he is not a relative, is not trustworthy to testify, except when speaking inadvertently [mesiach lefi tumo] he is trustworthy, like the incident brought in the Gemara [Ketubot 27b] regarding one who was taken captive, he and his wife and their son, and the son spoke inadvertently and said: "We were taken captive among the Arabs, I and my mother; I went out to draw water, my mind was on my mother; I went out to gather wood, and my mind was on my mother," and the sages married her to a kohen based on his word. And according to the opinion of the Rambam, this son was a minor, and therefore they required him to speak inadvertently, and not because of his kinship. But most of the poskim disagree with him and hold that a minor can testify when he is not her son even without speaking inadvertently, but her son and daughter, even if they are adults, are not trustworthy to testify—only when speaking inadvertently are they trustworthy; and the incident we cited, he was not a minor, but rather because he was her son, therefore they did not believe him unless he spoke inadvertently. And in the Yerushalmi there [Chapter 2, Halacha 9] it implies explicitly that even her minor son can testify, see there, but this is not the way of our Talmud. And similarly, a male slave and a female slave are trustworthy to testify, and even the husband's female slave, but her own female slave is not trustworthy except when speaking inadvertently, for her female slave is attached to her and is not trustworthy without speaking inadvertently. And the husband is not trustworthy in any case, even when speaking inadvertently, just like she herself, for his wife is considered like his own body. And even with an oath he is not trustworthy [as is proven from Rabbi Zechariah in Halacha 9 there], for the fact that they believed a woman to say that her husband died is because she is afraid to ruin herself if she marries and the first husband comes, as I wrote in siman 17, but regarding a captive woman who has no fear that she will ruin herself, she is not trustworthy even when speaking inadvertently, for regarding the interested party themselves, "inadvertently" is not applicable, and similarly the husband, who is considered like her own body. And two captive women who testified, each for her fellow—they are trustworthy, and we do not fear reciprocal testimony [gomlin], for they were lenient regarding the testimony of a captive woman for the reasons we explained in section 1. Nevertheless, some say that a gentile is not trustworthy to testify, and even when speaking inadvertently he is not trustworthy. And even though to testify that her husband died he is trustworthy when speaking inadvertently, as I wrote there, but to testify regarding a captive woman that she is pure, his testimony is nothing. And the reason seems to me to be that the testimony of a captive woman is when he testifies that his hand almost did not move from her hand, and if so, if he was secluded with her constantly, there is no greater disqualification than this; and according to this, a gentile woman would be trustworthy. And there are those who are lenient regarding a gentile speaking inadvertently, and thus the great Acharonim ruled. And his testimony can be that he spoke inadvertently that all the time he and other men and women were with her constantly, and she was not secluded with him alone for a long time. And hearsay testimony [ed mipi ed] is also valid regarding a captive woman. [The dispute between the Rambam and the poskim I wrote according to the Gra, subsection 2, and with what I wrote the difficulty of the Chelkat Mechokek, subsection 2, is answered, and the words of the Beit Shmuel are not sufficient, and examine it well].
לדעת הרמב"ם ז"ל כל קרוב נאמן להעיד אפילו בנה ובתה הגדולים, וכל קטן אפילו אינו קרוב אינו נאמן להעיד, רק במסיח לפי תומו נאמן כמעשה שהובא בגמ' [כתובות כ"ז:] באחד שנשבה הוא ואשתו ובנם, והבן הסיח לפי תומו ואמר: "נשבינו לבין ערביים אני ואמי, יצאתי לשאוב מים דעתי על אמי, יצאתי ללקוט עצים ודעתי על אמי", והשיאוה חכמים לכהן על פיו. ולדעת הרמב"ם זה הבן קטן היה ולכן הצריכוהו להסיח לפ"ת ולא מפני קריבותו. אבל רוב הפוסקים חולקים עליו וס"ל דקטן יכול להעיד כשאינו בנה ואפילו אינו מסל"ת, אבל בנה ובתה אפילו גדולים אין נאמנין להעיד – רק במסל"ת נאמנין, והמעשה שהבאנו לאו קטן היה, אלא משום שהיה בנה לפיכך לא האמינוהו אא"כ מסל"ת ובירושלמי שם [פ"ב ה"ט] משמע להדיא דאפילו בנה קטן יכול להעיד ע"ש, אבל אין זה דרך הש"ס שלנו. וכן עבד ושפחה נאמנין להעיד, ואפילו שפחתו של הבעל, אבל שפחתה – אינה נאמנת רק במסל"ת, דשפחתה מקושר לה ואינה נאמנת בלא מסל"ת. והבעל אינו נאמן בכל ענין אף במסל"ת כמו היא עצמה, דאשתו כגופו דמי. ואפילו בשבועה אינו נאמן [כדמוכח מר' זכריה בהלכה ט' שם], דזה שהאמינו לאשה לומר שמת בעלה זהו מפני שמתייראת לקלקל עצמה אם תנשא ויבא הבעל הראשון כמ"ש בסי' י"ז, אבל בשבויה שאין לה יראה שתקלקל עצמה אינה נאמנת אף במסל"ת, דבבעל דבר עצמו לא שייך לפי תומו, וכן הבעל דכגופו דמיא. ושתי שבויות שהעידו כל אחת לחבירתה – נאמנות ולא חיישינן לגומלין, דהקילו בעדות השבויה מטעמים שבארנו בסעי' א'. ומ"מ י"א שכותי אינו נאמן להעיד, ואף במסל"ת אינו נאמן. ואע"ג דלהעיד שמת בעלה נאמן במסל"ת כמ"ש שם, אבל להעיד על השבויה שטהורה היא אין עדותו כלום. והטעם נ"ל דהרי עדות שבויה הוא כשיעיד שכמעט לא זזה ידו מתוך ידה, וא"כ אם הוא נתייחד עמה תמיד אין לך פסול גדול מזה, ולפ"ז היתה כותית – נאמנת. ויש מקילין בכותי מסל"ת, וכן הכריעו גדולי האחרונים. ועדותו יכול להיות שהסיח לפי תומו שכל הזמן היה הוא ועוד אנשים ונשים עמה תמיד ולא נתייחדה עמו לבדו זמן רב. ועד מפי עד ג"כ כשר בשבויה. [פלוגתת הרמב"םוהפוסקים כתבתי ע"פ הגר"א סק"ב, ובמ"ש מתורץ קושיית הח"מ סק"ב, ודברי הב"ש אינם מספיקים, ודו"ק].