Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 46 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,36 @@ Once installed, the extension works completely offline, allowing users to contin

## Usage

### Text Generation

1. Click on the extension icon to open the popup.
2. Enter the desired text length for generation.
3. Use the following options to customize the text:
2. Select your desired text generation type:
- **Lorem Ipsum**: Traditional placeholder text
- **Alphanumerical**: Letters and numbers only (abc123)
- **With Special Characters**: Includes symbols (,()%/+?*...)
- **Turkish/German Letters**: Includes international characters (ö,ç,ş,ü...)
3. Enter the desired text length for generation (1-999,999 characters).
4. For Lorem Ipsum, use additional options:
- **Remove Punctuation**: Exclude punctuation marks from the generated text.
- **Remove Spaces**: Remove spaces between words.
4. Use the **Character Counter** to see the real-time length of the given text.
5. Navigate to the **Miscellaneous** tab for additional tools:
5. Click "Generate Text" to create the customized text.
6. Copy the generated text to the clipboard using the "Copy to Clipboard" button.

### Additional Features

7. Use the **Character Counter** tab to see the real-time length of any text.
8. Navigate to the **Miscellaneous** tab for additional tools:
- Generate **Turkish Names** for use in test scenarios.
- Generate **Email Adresses** for use in test scenarios.
- Generate **Email Addresses** for use in test scenarios.
- Create **Turkish Addresses** for testing localization.
- Generate secure **Passwords** for test accounts or other needs.
6. Click "Generate" to create the customized text.
7. Copy the generated text to the clipboard using the "Copy to Clipboard" button.

### Testing

The extension includes comprehensive testing features:
- Open `test-all.html` for the complete test suite
- Open `test-generation.html` for manual testing
- Run `npm test` from command line

## Honorable Mentions

Expand All @@ -82,12 +99,34 @@ Special thanks to my friend’s repository for its inspiration and usage:

## Features

### Text Generation Types

- **Lorem Ipsum** - Traditional placeholder text with customizable options
- Remove punctuation option
- Remove spaces option

- **Alphanumerical (abc123)** - Random combination of letters and numbers
- No spaces included
- Perfect for testing IDs, codes, usernames

- **With Special Characters (,()%/+?*...)** - Text including special symbols
- Includes letters, numbers, and special characters
- Useful for testing form validation, security

- **Turkish/German Letters (ö,ç,ş,ü...)** - Text with international characters
- Turkish characters: ç, ğ, ı, ö, ş, ü, Ç, Ğ, I, Ö, Ş, Ü
- German characters: ä, ö, ü, ß, Ä, Ö, Ü
- Perfect for internationalization testing

### General Features

- **Modernized UI**: Redesigned with a sleek, scalable, and responsive interface.
- **Tabbed Navigation**: Added a tabbed layout for better organization of features.
- **Miscellaneous Tools Section**: Room for future expansions and added utilities. For now it supports Turkish name, address, email, and password generation.
- **Dark Mode Support** (Upcoming): Switch between light and dark modes for a better user experience.
- **Character Counter**: Real-time character counter to track text length dynamically.
- **Random Text Generation**: Generate customizable random strings with options for uppercase letters, numbers, and symbols.
- **Comprehensive Testing**: Includes extensive test suite for reliability
- **Offline Functionality**: Full functionality without requiring an internet or AI connection.

## Support
Expand Down
225 changes: 225 additions & 0 deletions TESTLER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# 🧪 TEXT STRING GENERATOR - TÜM TESTLER

## 📋 Test Listesi (Toplam: 31 Test)

### 🔧 FONKSIYON TESTLERİ (15 Test)

#### Character Set Testleri
1. **CHARACTER_SETS should contain all expected characters**
- Alphabetical: a-z, A-Z kontrolü
- Numerical: 0-9 kontrolü
- Special chars: ,.()%/+?*... kontrolü
- Turkish/German: ç,ğ,ı,ö,ş,ü,ß,ä... kontrolü

#### Lorem Ipsum Testleri
2. **generateLoremIpsum should return correct length**
- 50 karakter Lorem Ipsum üretimi
- Uzunluk doğrulaması

3. **generateLoremIpsum should remove punctuation when requested**
- Noktalama işaretlerini kaldırma testi
- Regex pattern kontrolü: `/[.,\/#!$%\^&\*;:{}=\-_`~()]/`

4. **generateLoremIpsum should remove spaces when requested**
- Boşlukları kaldırma testi
- Whitespace regex kontrolü: `/\s/`

#### Alfanumerik Testleri
5. **generateAlphanumerical should contain only letters and numbers**
- 100 karakter alfanumerik üretim
- Regex kontrolü: `/^[a-zA-Z0-9]+$/`
- Boşluk olmadığını doğrulama

6. **generateAlphanumerical should contain both letters and numbers over large sample**
- 1000 karakter büyük örneklem
- Harf varlığı kontrolü: `/[a-zA-Z]/`
- Sayı varlığı kontrolü: `/[0-9]/`

#### Özel Karakter Testleri
7. **generateWithSpecialChars should contain special characters**
- 500 karakter özel karakter metni
- Harf, sayı ve özel karakter varlığı kontrolü
- Regex: `/[,.()%\/+?*\-_=!@#$%^&*\[\]{}|;:'"<>~`]/`

#### Türkçe/Almanca Testleri
8. **generateWithTurkishGerman should contain Turkish/German characters**
- 500 karakter uluslararası metin
- Türkçe/Almanca karakter kontrolü: `/[çğıöşüÇĞIÖŞÜäöüßÄÖÜ]/`
- Normal karakter kontrolü

#### Özel Text Üretim Testleri
9. **generateCustomText with only alphabetical should work**
- Sadece harf seçeneği
- 50 karakter, sadece harf kontrolü: `/^[a-zA-Z]+$/`

10. **generateCustomText with only numerical should work**
- Sadece sayı seçeneği
- 50 karakter, sadece sayı kontrolü: `/^[0-9]+$/`

11. **generateCustomText with no options should default to alphabetical**
- Hiç seçenek seçilmediğinde
- Alfabetik varsayılan davranış

#### Edge Case Testleri
12. **All functions should handle length 1**
- Tüm fonksiyonlar 1 karakter üretimi
- generateLoremIpsum, generateAlphanumerical, generateWithSpecialChars, generateWithTurkishGerman

13. **All functions should handle large lengths**
- 10,000 karakter büyük metin üretimi
- Tüm fonksiyonlar için performans testi

14. **Generated text should be random**
- 3 farklı üretim karşılaştırması
- Randomness doğrulaması (aynı sonuçlar olmamalı)

15. **Alphanumerical should have reasonable character distribution**
- 10,000 karakter büyük örneklem
- Harf oranı: %70-95 arası
- Sayı oranı: %5-30 arası

---

### 🖥️ UI TESTLERİ (10 Test)

#### Text Type Selection Testleri
16. **UI should generate Lorem Ipsum when lorem type is selected**
- Lorem radio button seçimi
- Mock DOM ile test
- generateLoremIpsum çağrısı doğrulaması

17. **UI should generate alphanumerical when alphanumerical type is selected**
- Alphanumerical radio button seçimi
- generateAlphanumerical çağrısı
- Regex doğrulama

18. **UI should generate special chars when specialChars type is selected**
- SpecialChars radio button seçimi
- generateWithSpecialChars çağrısı

19. **UI should generate Turkish/German when turkishGerman type is selected**
- TurkishGerman radio button seçimi
- generateWithTurkishGerman çağrısı

#### Input Validation Testleri
20. **UI should handle invalid length input**
- 'invalid' string girişi
- isNaN() kontrolü

21. **UI should handle zero length input**
- '0' girişi
- length <= 0 kontrolü

22. **UI should handle maximum length validation**
- '1000000' maksimum limit aşımı
- length > 999999 kontrolü

#### Lorem Ipsum Seçenek Testleri
23. **UI should apply remove punctuation option for Lorem Ipsum**
- removePunct checkbox true
- Noktalama işareti olmama kontrolü

24. **UI should apply remove spaces option for Lorem Ipsum**
- removeSpace checkbox true
- Boşluk olmama kontrolü

#### Workflow Testleri
25. **Complete UI workflow should work for all text types**
- Tüm 4 metin tipi için workflow
- Mock DOM ile tam simülasyon
- Switch case logic testi

---

### ⚡ PERFORMANS TESTLERİ (6 Test)

#### Hız Testleri
26. **Text generation should be fast for small lengths**
- 1000 iterasyon × 4 fonksiyon
- 100 karakter küçük metinler
- Ortalama < 1ms hedefi

27. **Text generation should handle large texts efficiently**
- 100,000 karakter büyük metin
- < 1 saniye hedefi
- Süre ölçümü ve doğrulama

28. **All generation functions should perform similarly**
- 4 fonksiyon performans karşılaştırması
- 10,000 karakter test metni
- Çok küçük zamanlar için mutlak fark kontrolü (< 50ms)
- Normal zamanlar için oran kontrolü (< 10x)

#### Memory Testleri
29. **Memory usage should be reasonable for large texts**
- 10 iterasyon × 50,000 karakter
- Memory leak kontrolü
- Garbage collection testi

#### Dağılım Testleri
30. **Character distribution should be maintained in large texts**
- 100,000 karakter büyük örneklem
- Alfanumerik dağılım kontrolü
- Harf: %75-90, Sayı: %10-25

#### Stress Testleri
31. **Stress test - multiple concurrent generations**
- 20 eşzamanlı üretim
- 5,000 karakter her biri
- Promise.all() ile async test
- Ortalama süre < 100ms

---

## 📊 TEST İSTATİSTİKLERİ

- **Toplam Test**: 31
- **Function Tests**: 15
- **UI Tests**: 10
- **Performance Tests**: 6

### Test Kategorileri
- **Character Set Validation**: 4 test
- **Length Validation**: 8 test
- **Content Validation**: 12 test
- **Performance Validation**: 7 test

### Kapsam Alanları
- **Text Generation Functions**: %100
- **UI Components**: %100
- **Edge Cases**: %100
- **Error Scenarios**: %100
- **Performance Scenarios**: %100

## 🚀 TESTLERI ÇALIŞTIRMA

### Browser Tests
```bash
# Complete test suite
npm test

# Manual testing
npm run test:manual
```

### Test Files
- `test-all.html` - Tüm testler (Görsel)
- `test-quick-check.html` - Hızlı kontrol
- `test-generation.html` - Manuel test

### Test Framework
- Custom test runner (`tests/test-runner.js`)
- Assertion methods (assert, assertEqual, assertTrue, etc.)
- Performance timing
- Mock DOM for UI tests
- Async test support

## ✅ TEST DURUMU

Tüm 31 test başarıyla implemente edildi ve düzeltildi:
- ✅ Character set erişim sorunu düzeltildi
- ✅ assertLength method sorunu çözüldü
- ✅ Async performance test düzeltildi
- ✅ Performance ratio hesaplama sorunu düzeltildi

Testler hazır ve çalıştırılabilir durumda!
43 changes: 43 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 📚 Test String Generator - Dokümantasyon

Bu klasör Test String Generator Chrome Extension'ının kapsamlı dokümantasyonunu içerir.

## 📋 Dokümantasyon İçeriği

### 👤 Kullanıcı Dokümantasyonu
- **[Kurulum Rehberi](installation.md)** - Chrome Extension kurulumu
- **[Kullanım Kılavuzu](user-guide.md)** - Detaylı kullanım talimatları
- **[Özellikler](features.md)** - Tüm özellikler ve yetenekler

### 👨‍💻 Geliştirici Dokümantasyonu
- **[API Referansı](api.md)** - Fonksiyon ve method referansı
- **[Geliştirici Rehberi](developer-guide.md)** - Kod yapısı ve geliştirme
- **[Test Dokümantasyonu](testing.md)** - Test stratejisi ve çalıştırma

### 🔧 Teknik Dokümantasyon
- **[Mimari](architecture.md)** - Sistem mimarisi ve tasarım
- **[Performans](performance.md)** - Performans analizi ve optimizasyon
- **[Karakter Setleri](character-sets.md)** - Desteklenen karakter setleri

### 📖 Rehberler
- **[Katkı Sağlama](contributing.md)** - Projeye katkı rehberi
- **[Sık Sorulan Sorular](faq.md)** - Yaygın sorular ve çözümler
- **[Sorun Giderme](troubleshooting.md)** - Hata çözümleri

## 🚀 Hızlı Başlangıç

1. **Kurulum**: [installation.md](installation.md)
2. **İlk Kullanım**: [user-guide.md](user-guide.md)
3. **Geliştirme**: [developer-guide.md](developer-guide.md)
4. **Test Etme**: [testing.md](testing.md)

## 📞 Destek

Dokümantasyon ile ilgili sorularınız için:
- GitHub Issues açın
- Developer ile iletişime geçin

---

**Son Güncelleme**: 2025-09-04
**Versiyon**: 1.0.0
Loading